Articles Comments

{ Berbagi, Menulis, Dan Mengajar } Ilmu… » 8. Data Comm / Inet of Things (IoT), Linux » Tips Trik Setting rp-pppoe

Tips Trik Setting rp-pppoe

Pada tulisan saya yang lalu mengenai ADSL Bridge, saya jelaskan installasi singkat program rp-pppoe, maka pada tulisan ini saya mencoba memberikan tips dan triks dalam mengkonfigurasi program rp-pppoe di linux debian linux,

kenapa perlu saya tuliskan disini ?, karena setelah saya baca mengenai manual installasi rp-pppoe di website resmi mereka, program ini secara resmi hanya menyediakan paket untuk linux RedHat dan Turunan-nya yang menggunakan basis RPM (Redhat Package Manager). Jadi kalo di debian kita mesti mengakali setting konfigurasi program rp-pppoe agar bisa jalan dengan normal saat mesin dijalankan.

Singkatnya, mesin Debian Linux yang akan digunakan sebagai gateway ADSL ini nantinya ketika di start dari kondisi mati ke sampai Jalan dengan normal harus bisa menjalankan rp-pppoe secara otomatis,

langsung to the point aja ya ?

setelah install rp-pppoe, maka kita akan mendapatkan binary pppoe di folder "/usr/bin/" paket program-nya adalah berawalan ppp*.

root@ptpn:~# cd /usr/sbin/
root@ptpn:/usr/sbin# ls ppp*
pppd pppoeconf pppoe-relay pppoe-sniff pppoe-status
pppdump pppoe-connect pppoe-server pppoe-start pppoe-stop
pppoe pppoe-discovery pppoe-setup pppoe-start~ pppstats

ikuti langkah langkah berikut ini,

1. Langkah Pertama, Setting Konfigurasi PPPOE

root@ptpn:/usr/sbin# pppoe-setup
Welcome to the Roaring Penguin PPPoE client setup. First, I will run
some checks on your system to make sure the PPPoE client is installed
properly…

Looks good! Now, please enter some information:

USER NAME

>>> Enter your PPPoE user name (default 15784011007898@telkom.net):

INTERFACE

>>> Enter the Ethernet interface connected to the DSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where ’n’ is a number.
(default eth0):

Do you want the link to come up on demand, or stay up continuously?
If you want it to come up on demand, enter the idle time in seconds
after which the link should be dropped. If you want the link to
stay up permanently, enter ’no’ (two letters, lower-case.)
NOTE: Demand-activated links do not interact well with dynamic IP
addresses. You may have some problems with demand-activated links.
>>> Enter the demand value (default no):

DNS

Please enter the IP address of your ISP’s primary DNS server.
If your ISP claims that ’the server will provide DNS addresses’,
enter ’server’ (all lower-case) here.
If you just press enter, I will assume you know what you are
doing and not modify your DNS setup.
>>> Enter the DNS information here:

PASSWORD

>>> Please enter your PPPoE password:
>>> Please re-enter your PPPoE password:

FIREWALLING

Please choose the firewall rules to use. Note that these rules are
very basic. You are strongly encouraged to use a more sophisticated
firewall setup; however, these will provide basic security. If you
are running any servers on your machine, you must choose ’NONE’ and
set up firewalling yourself. Otherwise, the firewall rules will deny
access to all standard servers like Web, e-mail, ftp, etc. If you
are using SSH, the rules will block outgoing SSH connections which
allocate a privileged source port.

The firewall choices are:
0 – NONE: This script will not set any firewall rules. You are responsible
for ensuring the security of your machine. You are STRONGLY
recommended to use some kind of firewall rules.
1 – STANDALONE: Appropriate for a basic stand-alone web-surfing workstation
2 – MASQUERADE: Appropriate for a machine acting as an Internet gateway
for a LAN
>>> Choose a type of firewall (0-2):

2. Langkah Kedua, Menjalankan rp-pppoe

root@ptpn:/usr/sbin# pppoe-start

3. Langkah Ketiga, Menambahkan script Boot Up

Pada langkah ini, kita tambahkan script boot up di konfigurasi /etc/network/interfaces

auto eth0
iface eth0 inet static
address 10.252.1.2
netmask 255.255.0.0
#gateway 10.252.1.1
dns-nameservers 202.134.1.10 202.134.0.155 192.168.11.254
name Ethernet LAN card
broadcast 10.252.255.255
network 10.252.0.0
post-up /usr/sbin/pppoe-start

4. Langkah Keempat, Menambahkan default routing dari server yang kita gunakan ke arah IP yang diperoleh dari interface PPP0, cara melihatnya yaitu lakukan dengan perintah ifconfig.

root@ptpn:/usr/sbin# ifconfig

ppp0 Link encap:Point-to-Point Protocol
inet addr:222.124.227.149 P-t-P:203.130.244.160 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:175883 errors:0 dropped:0 overruns:0 frame:0
TX packets:204645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:143887883 (137.2 MiB) TX bytes:24211662 (23.0 MiB)

Dari informasi diatas kita mendapatkan IP ADSL, 222.124.227.149 , kemudian jadikan IP ini sebagai default gateway dari mesin kita, secara manual perintahnya bisa kita ketik :

root@ptpn:# route add default gw 222.124.227.149

akan tetapi dalam tulisan ini, kita akan memodifikasi script pppoe-start, dengan menambahkan perintah route add default gw 222.124.227.149 ke line 173

root@ptpn# joe /usr/sbin/pppoe-start

# Monitor connection
TIME=0
while [ true ] ; do
${exec_prefix}/sbin/pppoe-status $CONFIG > /dev/null 2>&1

# Looks like the interface came up
if [ $? = 0 ] ; then
# Print newline if standard input is a TTY
tty -s && $ECHO " Connected!"
/sbin/route add default gw 222.124.227.149 —-> Line 173
exit 0
fi

if test -n "$FORCEPING" ; then
printf "%s" "$FORCEPING"
else
tty -s && printf "%s" "$PING"
fi
sleep $CONNECT_POLL
TIME=`expr $TIME + $CONNECT_POLL`

5. Langkah Kelima, Lakukan reboot mesin dan check routing.

Jika setting diatas telah selesai, kemudian lakukan reboot mesin gateway ADSL anda, kemudian lakukan checking terhadap kondisi jaringan

Check Interface ppp0

ppp0 Link encap:Point-to-Point Protocol
inet addr:222.124.227.149 P-t-P:203.130.244.160 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:187175 errors:0 dropped:0 overruns:0 frame:0
TX packets:217660 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:153436864 (146.3 MiB) TX bytes:25799108 (24.6 MiB)

Check Table Routing –> pastikan Default Gw Adalah ke IP Speedy …

Oke Good Luck

Filed under: 8. Data Comm / Inet of Things (IoT), Linux

Leave a Reply

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>