langkah2 menginstal freebsd router

FreeBSD fuck Linux/etc/rc.conf

#setting ip address

ifconfig_sis0=”inet 192.168.5.10 netmask 255.255.255.0″#setting ip lan
ifconfig_rl0=”inet 192.168.1.2 netmask 255.255.255.0″ #setting ip public
defaultrouter=”192.168.1.1″ #gateway ke modem
hostname=”router.dinas-pertanian.gov.id” <- terserah aja sich mo diganti apa aja

sshd_enable=”YES”
gateway_enable=”YES”
natd_enable=”YES”
natd_interface=”rl0″
fsck_y_enable=”YES”

ppp_enable=”YES”
ppp_mode=”ddial”
ppp_profile=”speedy”
ppp_nat=”YES”

============
#setting dns
============
ee /etc/resolv.conf
nameserver 203.130.193.74 -> batam
nameserver 202.134.0.155 -> lupa dimana :P

=========================
masuk ke direktori kernel
=========================
cd /usr/src/sys/i386/conf/
router# ll
total 70
-rw-r–r– 1 root wheel 9798 Oct 24 2004 GENERIC <- nama awal kernel sebelum di uprrgade
-rw-r–r– 1 root wheel 1982 Apr 1 2004 GENERIC.hints
-rw-r–r– 1 root wheel 10927 Jan 14 23:32 MPL <- nama kernal yang akan di ekstrak / kompile
-rw-r–r– 1 root wheel 120 Feb 26 2003 Makefile
-rw-r–r– 1 root wheel 33470 Oct 24 2004 NOTES
-rw-r–r– 1 root wheel 469 Jul 13 2004 OLDCARD
-rw-r–r– 1 root wheel 1763 Oct 11 2004 PAE
-rw-r–r– 1 root wheel 218 Oct 23 2004 SMP
-rw-r–r– 1 root wheel 3991 Jul 26 2002 gethints.awk

===========
backup kernel
===========

cp GENERIC ROUTER
edit nama kernel

ee ROUTER [enter]
ganti iden GENERIC menjadi nama kernel

ident ROUTER

#squid
options SYSVMSG
options MSGMNB=8192
options MSGMNI=40
options MSGSEG=512
options MSGSSZ=64
options MSGTQL=2048

options SYSVSHM
options SHMSEG=16
options SHMMNI=32
options SHMMAX=2097152
options SHMALL=4096
#packet filter
device pf
device pflog
device pfsync
#management bw
options ALTQ
options ALTQ_CBQ
options ALTQ_RED
options ALTQ_RIO
options ALTQ_HFSC
options ALTQ_CDNR
options ALTQ_PRIQ
#ip firewall
options IPDIVERT
options IPFIREWALL
options IPFIREWALL_DEFAULT_TO_ACCEPT
#transparent proxy
options IPFIREWALL_VERBOSE
options IPFIREWALL_FORWARD
options IPFIREWALL_VERBOSE_LIMIT=100
options HZ=1000
#speedy
options NETGRAPH
options NETGRAPH_ETHER
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET

=============
kompel kernel
=============

config ROUTER
cd ../compile/ROUTER
make depend;make;make install;reboot

================
disable sendmail
================
router# ee /etc/mail/mailer.conf

# $FreeBSD: src/etc/mail/mailer.conf,v 1.3 2002/04/05 04:25:12 gshapiro Exp $
#
# Execute the “real” sendmail program, named /usr/libexec/sendmail/sendmail
#

#sendmail /usr/libexec/sendmail/sendmail
#s#end-mail /usr/libexec/sendmail/sendmail
#mailq /usr/libexec/sendmail/sendmail
#newaliases /usr/libexec/sendmail/sendmail
#hoststat /usr/libexec/sendmail/sendmail
#purgestat /usr/libexec/sendmail/sendmail

==============
setting speedy
==============

ee /etc/ppp/ppp.conf

default:
set device PPPoE:rl0
set speed sync
set mru 1492
set mtu 1492
set ctsrts off
enable lqr
set log phase tun
add default HISADDR
enable dns
speedy:
set authname [email protected]
set authkey password speedy

========
firewall
========
/sbin/ipfw add deny tcp from any to any 135-137
/sbin/ipfw add deny udp from any to any 135-137
/sbin/ipfw add deny tcp from any to any 6257
/sbin/ipfw add deny udp from any to any 6257
/sbin/ipfw add deny tcp from any to any 6699
/sbin/ipfw add deny udp from any to any 6699
/sbin/ipfw add deny tcp from any to any 2754
/sbin/ipfw add deny udp from any to any 2754
/sbin/ipfw add deny tcp from any to any 2535
/sbin/ipfw add deny udp from any to any 2535
/sbin/ipfw add deny tcp from any to any 4661-4672
/sbin/ipfw add deny udp from any to any 4661-4672
/sbin/ipfw add deny tcp from any to any 1214
/sbin/ipfw add deny udp from any to any 1214
/sbin/ipfw add deny tcp from any to any 1024
/sbin/ipfw add deny udp from any to any 1024
/sbin/ipfw add deny tcp from any to any 6881-6889
/sbin/ipfw add deny udp from any to any 6881-6889
/sbin/ipfw add deny tcp from any to any 6346-6347
/sbin/ipfw add deny udp from any to any 6346-6347

===========================
ngedit tampilan awal router
===========================

ee /etc/motd

FreeBSD 5.3-RELEASE (MPL) #0: Mon Jan 14 23:44:30 UTC 2008

Welcome to Proxy Server MPL

Leave a comment

Your email address will not be published.


*