Thu 9 Apr 2009
Koneksi PPPoe ADSL di FreeBSD 7.0
Posted by harinto under FreeBSD
No Comments
disini adalah contoh yang saya terapkan dimesin FreeBSD 7 dimana juga sebagai NAT dengan menggunakan 2 ethernet card yaitu fxp0 dan rl0,
Pertama tama aktifkan dulu tcp forwarding di FreeBSD anda dengan perintah
yunand# sysctl -w net.inet.ip.forwarding=1
agar bisa dijalankan saat mesin hidup edit di /etc/sysctl.conf
masukkan di sysctl.conf net.inet.ip.forwarding=1
Setelah itu bikin file config ppp seperti dibawah ini :
yunand# cat ppp.conf
#
# ppp.conf: PPPoE configuration
#
default:
# PPP over Ethernet
set device PPPoE:fxp0 (tergantung landcard yang dipasang modem adsl)
set speed sync
set mru 1492
set mtu 1492
set ctsrts off
# monitor line quality
enable lqr
# log just a bit
set log phase tun
# insert default route upon connection
add default HISADDR
# download /etc/resolv.conf
enable dns
speedy:
set authname user speedy
set authkey password speedy
untuk dialnya menggunakan perintah
yunand# ppp -ddial papchap
Loading /lib/libalias_cuseeme.so
Loading /lib/libalias_ftp.so
Loading /lib/libalias_irc.so
Loading /lib/libalias_nbt.so
Loading /lib/libalias_pptp.so
Loading /lib/libalias_skinny.so
Loading /lib/libalias_smedia.so
Working in ddial mode
Using interface: tun0
jika berhasil cek ip
yunand # ifconfig
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1492
inet 125.163.*.* –> 125.163.*.* netmask 0xffffffff
Opened by PID 994
jika keluar seperti itu berarti koneksi berhasil
setelah itu coba tes ping ke google
yunand# ping www.google.com
PING google.com (72.14.207.99): 56 data bytes
64 bytes from 72.14.207.99: icmp_seq=0 ttl=242 time=593.632 ms
64 bytes from 72.14.207.99: icmp_seq=1 ttl=242 time=624.894 ms
64 bytes from 72.14.207.99: icmp_seq=2 ttl=242 time=617.091 ms
64 bytes from 72.14.207.99: icmp_seq=3 ttl=242 time=619.140 ms
kalau reply seperti diatas berarti koneksi berjalan lancar
kalau ingin mematikan koneksi adslnya pake perintah
yunand# killall ppp
untuk sharing internetnya saya menggunakan packet filter openbsd, aktifkan packet filternya agar bisa
dijalankan setiap boot
yunand#pico /etc/rc.conf
pf=â€YESâ€
sedangkan script pf.conf nya saya pakai seperti ini
yunand# cat pf.conf
lan_net = “192.168.2.0/24″ #ip client
int_if1Â = “fxp0″ #lancard yg ke modem adsl
int_if2Â = “rl0″ #lancard yg ke akses point/client
ext_if  = “tun0″
# nat outgoing connections on each internet interface
nat on $ext_if from $lan_net to any -> ($ext_if)
nat on $int_if1 from $lan_net to any -> ($int_if1)
lalu jalankan pf nya
yunand# pfctl -f /etc/pf.conf
setelah itu cek clientnya apakah bisa konek keinternet
source : http://www.yunand.info

No Responses to “ Koneksi PPPoe ADSL di FreeBSD 7.0 ”