Tulisan ini sebelumnya bagian dari tulisan menjadikan linux sebagai gateway
tapi gak apapa karena ini cuma sekilas dan sangat nyambung pula
Sebelumnya kita harus sudah punya line telepon, mendaftar ke plasa telkom, mendapatkan sebuah modem, username dan password. juga jangan lupa tagihannya.
Kebetulan saya menggunakan speedy paket office yang bisa digunakan secara 24 jam tanpa time limit, jadi yang pertama kita bahasa adalah untuk koneksi 24 jam.
coba periksa kelengkapan command yang dibutuhkan untuk koneksi pppoe dengan perintah
$ pppoe[tab]
o iya gunakan tab untuk menyambung secara otomatis kepada perintah atau file yang berkaitan. seperti di atas, tombol tab ditekan langsung tanpa spasi. contoh
server@Linux:~$ pppoe
pppoe pppoe-connect pppoe-relay pppoe-setup pppoe-start pppoe-stop
pppoeconf pppoe-discovery pppoe-server pppoe-sniff pppoe-status
jadi kita tahu apa-apa perintah yang dapat kita coba.
baik, kita coba 1 yaitu pppoe-setup (saya lupa, apakah ini saya yang install secara manual atau bawaan ubuntu, karena ada 1 lagi yaitu pppoeconf. nanti kita bahas keduanya)
server@Linux:~$ 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…
/usr/sbin/pppoe-setup: Sorry, you must be root to run this script
Mudah-mudahan bisa dimengerti apa maksudnya, yaitu kita harus sebagai root untuk menjalankannya.
server@Linux:~$ sudo 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 root):
contoh X11231000XXX@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 ):
Enter saja, jika kita tidak punya 2 ethernet atau lebih, jika ethernet kita ada 2 kita harus menentukan yang mana untuk tersambung ke model adsl yang mana ke LAN, jika memang dipisah, tapi karena saya menggunakan 1 ethernet saja ya saya pilih default yaitu enter saja (eth0)
DNS
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):
enter saja
PASSWORD
>>> Please enter your PPPoE password:
Masukkan password speedynya
>>> Please re-enter your PPPoE password:
Ulangi passwordnya
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):
Pilih 2 untuk berbagai pakai (internet connection sharing kalo di windows), bila cuma 1 unit saja ya pilih 1.
** Summary of what you entered **
Ethernet Interface:
User name: X11231000XXX@telkom.net
Activate-on-demand: No
DNS: Do not adjust
Firewalling: MASQUERADE
Pilih Y
>>> Accept these settings and adjust configuration files (y/n)? y
Adjusting /etc/ppp/pppoe.conf
Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets
(But first backing it up to /etc/ppp/pap-secrets-bak)
(But first backing it up to /etc/ppp/chap-secrets-bak)
Congratulations, it should be all set up!
Type ‘pppoe-start’ to bring up your PPPoE link and ‘pppoe-stop’ to bring
it down. Type ‘pppoe-status’ to see the link status.
$ pppoe-start
untuk mennyambungkan speedy,
$ pppoe-stop
dan
$ pppoe-status
untuk melihat statusnya.
Kemudian tadi kita lihat masih ada cara 1 lagi dengan menggunakan pppoeconf
coba langsung dengan
$ pppoeconf
jika dibutuhkan privileges root tinggal pakai sudo saja
kelebihan pppoeconf ini adalah adalanya pilihan untuk autoconnect at boot, ini sangat membantu untuk membuat auto connect ketika booting, biasanya dipakai untuk mesin yang konek ke internet 24 jam.
dan perintah ntuk menyambungkannya adalah
$ pon
dan memutuskannya cukup dengan
$ poff
Jika diaktifkan di auto connect at boot maka akan ada tambahan di /etc/network/interfaces
iface ppp0 inet ppp
provider ppp0
auto ppp0
atau bisa menggunakan apa yang dibuat oleh settingan pppoeconf
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider
auto dsl-provider
coba lihat apakah interface ppp0 sudah aktif
server@Linux:~$ ifconfig
ppp0 Link encap:Point-to-Point Protocol
inet addr:125.162.36.199 P-t-P:125.162.36.1 Mask:255.255.255.255
ping yahoo.com untuk mentest(jika perlu)
server@Linux:~$ ping yahoo.com
PING yahoo.com (206.190.60.37) 56(84) bytes of data.
64 bytes from w2.rc.vip.re4.yahoo.com (206.190.60.37): icmp_seq=1 ttl=46 time=316 ms
64 bytes from w2.rc.vip.re4.yahoo.com (206.190.60.37): icmp_seq=2 ttl=46 time=318 ms
— yahoo.com ping statistics —
5 packets transmitted, 4 received, 20% packet loss, time 3997ms
rtt min/avg/max/mdev = 316.890/333.897/378.023/25.542 ms
Ctrl+c untuk menghentikannya