Membuat router warnet dengan freebsd, tulisan aslinya berasal dari mustnofee saya ubah dengan bahasa saya sendiri, tapi code tetap milik mustnofee.
Install Freebsd
Set disk label dengan hardisk 80GB, jika harddisk kita lebih silahkan di sesuaikan dengan kebutuhan
- / 512MB
- swap 1GB
- /tmp 1GB
- /usr 4GB
- /var 2GB
- /home 1GB
- /cache (sisa space hardisk ).
Setelah partisi / pemberian disk label selesai lanjutkan ketahab installasi pilih optioon :
Kern-Developer Full binaries and doc, kernel source only.
Jika ada kotak dialog yang menanyakan install ports pilih no to install ports.
Exit.
Pilih Distribution Media – CD
Confirmasi Installation – YES, Tunggu sampai selesai
Sesudah itu jika ada pertanyaan pilih saja jawabannya NO, setting time-zone dan root password.
Reboot.
Setelah Installasi FreeBSD selesai
edit /etc/rc.conf dengan perintah ee /etc/rc.conf
ubah configurasinya sesuaikan dengan jaringan milik kita.
defaultrouter="192.168.2.1" #Gateway ISP
gateway_enable="YES" #opsi gateway client
hostname="warnet"
sshd_enable="YES"
ifconfig_rl0="inet 192.168.2.103 netmask 255.255.255.0"
Edit /etc/resolv.conf dengan perintah ee /etc/resolv.conf
isikan sesuai dns kita
misalnya kita gunakan opendns milik google
nameserver 8.8.8.8
nameserver 8.8.4.4
Edit /etc/ssh/sshd_config dengan perintah ee /etc/ssh/sshd_config
Port 22 # You can change this.
LoginGraceTime 10m
PermitRootLogin yes
MaxAuthTries 2
PrintMotd yes
UseDNS no
Restart mesin dengan perintah reboot
Update ke Stabel dengan CVS
Pertama kita install paketnya dengan perintah pkg_add -r cvsup-without-gui
Buat file /root/cvs-suplife dan masukkan ini didalamnya
*default host=cvsup.freebsd.or.id #change this address with your local freebsd mirror.
*default base=/usr
*default prefix=/usr
*default release=cvs
*default delete use-rel-suffix
*default tag=RELENG_6
*default compress
src-all
ports-all tag=.
Kemudian eksekusi perintah /usr/local/bin/cvsup -g -L2 cvs-supfile.
Tunggu sampai aktifitas update selesai
Build kernel untuk mempatch pf with altq.
cd /usr/src/sys/i386/conf
cp GENERIC /etc/warnet
ln -s /etc/warnet
Edit /etc/warnet dengan perintah ee /etc/warnet
Jadi seperti ini
machine i386
cpu I586_CPU
cpu I686_CPU
ident NoFee
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
options SCHED_4BSD # 4BSD scheduler
options PREEMPTION # Enable kernel thread preemption
options INET # InterNETworking
options FFS # Berkeley Fast Filesystem
options SOFTUPDATES # Enable FFS soft updates support
options UFS_ACL # Support for access control lists
options UFS_DIRHASH # Improve performance on big directories
options MD_ROOT # MD is a potential root device
options MSDOSFS # MSDOS Filesystem
options CD9660 # ISO 9660 Filesystem
options PROCFS # Process filesystem (requires PSEUDOFS)
options PSEUDOFS # Pseudo-filesystem framework
options GEOM_GPT # GUID Partition Tables.
options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!]
options COMPAT_FREEBSD4 # Compatible with FreeBSD4
options COMPAT_FREEBSD5 # Compatible with FreeBSD5
options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI
options KTRACE # ktrace(1) support
options SYSVSHM # SYSV-style shared memory
options SYSVMSG # SYSV-style message queues
options SYSVSEM # SYSV-style semaphores
options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions
options KBD_INSTALL_CDEV # install a CDEV entry in /dev
options ADAPTIVE_GIANT # Giant mutex is adaptive.
#options SMP # this option for multi proccessor.
options ALTQ
options ALTQ_CBQ # Class Bases Queuing (CBQ)
options ALTQ_RED # Random Early Detection (RED)
options ALTQ_RIO # RED In/Out
options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC)
options ALTQ_PRIQ # Priority Queuing (PRIQ)
options ALTQ_NOPCC # Required for SMP build
options SHMMAX=33554432
options SHMSEG=256
options SHMMNI=512
options SEMMNS=2048
options SEMMNU=256
options SEMMAP=256
options SHMALL=16384 # max amount of shared memory (pages)
options MSGMNB=16384 # max # of bytes in a queue
options MSGMNI=96 # number of message queue identifiers
options MSGSEG=4096 # number of message segments
options MSGSSZ=128 # size of a message segment
options MSGTQL=4096 # max messages in system
device apic # I/O APIC
# Bus support.
device eisa
device pci
# ATA and ATAPI devices
device ata
device atadisk # ATA disk drives
device ataraid # ATA RAID drives
device atapicd # ATAPI CDROM drives
device atapifd # ATAPI floppy drives
device atapist # ATAPI tape drives
options ATA_STATIC_ID # Static device numbering
# SCSI Controllers
device ahb # EISA AHA1742 family
device ahc # AHA2940 and onboard AIC7xxx devices
options AHC_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~128k to driver.
device ahd # AHA39320/29320 and onboard AIC79xx devices
options AHD_REG_PRETTY_PRINT # Print register bitfields in debug
# output. Adds ~215k to driver.
device amd # AMD 53C974 (Tekram DC-390(T))
device isp # Qlogic family
device mpt # LSI-Logic MPT-Fusion
device sym # NCR/Symbios Logic (newer chipsets + those of `ncr’)
device adv # Advansys SCSI adapters
device adw # Advansys wide SCSI adapters
device aha # Adaptec 154x SCSI adapters
device aic # Adaptec 15[012]x SCSI adapters, AIC-6[23]60.
device bt # Buslogic/Mylex MultiMaster SCSI adapters
device ncv # NCR 53C500
# SCSI peripherals
device scbus # SCSI bus (required for SCSI)
device ch # SCSI media changers
device da # Direct Access (disks)
device sa # Sequential Access (tape etc)
device cd # CD
device pass # Passthrough device (direct SCSI access)
device ses # SCSI Environmental Services (and SAF-TE)
# RAID controllers interfaced to the SCSI subsystem
device amr # AMI MegaRAID
device arcmsr # Areca SATA II RAID
device asr # DPT SmartRAID V, VI and Adaptec SCSI RAID
device ciss # Compaq Smart RAID 5*
device dpt # DPT Smartcache III, IV – See NOTES for options
device hptmv # Highpoint RocketRAID 182x
device rr232x # Highpoint RocketRAID 232x
device iir # Intel Integrated RAID
device ips # IBM (Adaptec) ServeRAID
# RAID controllers
device aac # Adaptec FSA RAID
device aacp # SCSI passthrough for aac (requires CAM)
device ida # Compaq Smart RAID
device mfi # LSI MegaRAID SAS
device mlx # Mylex DAC960 family
device pst # Promise Supertrak SX6000
# atkbdc0 controls both the keyboard and the PS/2 mouse
device atkbdc # AT keyboard controller
device atkbd # AT keyboard
device kbdmux # keyboard multiplexer
device vga # VGA video card driver
device splash # Splash screen and screen saver support
# syscons is the default console driver, resembling an SCO console
device sc
device agp # support several AGP chipsets
device pmtimer
# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the ‘device miibus’ line in order to use these NICs!
device miibus # MII bus support
device fxp # Intel EtherExpress PRO/100B (82557, 82558)
device rl # RealTek 8129/8139
device sis # Silicon Integrated Systems SiS 900/SiS 7016
device vr # VIA Rhine, Rhine II
device xl # 3Com 3c90x (“Boomerang”, “Cyclone”)
# Pseudo devices.
device loop # Network loopback
device random # Entropy device
device ether # Ethernet support
device tun # Packet tunnel.
device pty # Pseudo-ttys (telnet etc)
device md # Memory “disks”
device gif # IPv6 and IPv4 tunneling
device bpf # Berkeley packet filter
Patch Kernel
cd /usr/src
make buildworld; make buildkernel KERNCONF=warnet; make installkernel KERNCONF=warnet
Jika menggunakan dual processor :
make -j4 buildworld; make -j4 buildkernel KERNCONF=warnet; make installkernel KERNCONF=warnet{/xtype_code}
Lengkapnya:
http://www.mustnofee.com/tutorials/62-step-by-step-freebsd-as-internet-server

