Bring pppd up after reboot
Step 1: Fill in the password and username
Change *-secrets
file in/etc/ppp
,usually you need to modify 2 files:
$ cd /etc/ppp/
$ sudo vi chap-secrets
$ sudo vi pap-secrets
Replace the USERNAME
and PASSWORD
in *-secrets
assigned by your ISP.
# Secrets for authentication using CHAP/PAP
# client server secret IP addresses
"USERNAME" * "PASSWORD" *
Step 2: Create a peer file
Create a Peer file that contains the settings for connecting to your ISP.
$ cd /etc/ppp/peers
# This file can be named whatever you want.We name it test_a for example
$ sudo vi test_a
Then edit/save /etc/ppp/peers/test_a
to look like this:
user "USERNAME"
noipdefault
usepeerdns
defaultroute
replacedefaultrout
persist
noauth
plugin rp-pppoe.so eth0
hide-password
Step 3: Modify /etc/network/interfaces
If you want pppd to start automatically after reboot, you can just simply change interfaces to look like this:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet ppp
pre-up /sbin/ip link set dev eth0 up
provider test_a
post-down /sbin/ip link set dev eth0 down
Step 4: Reboot
$ sudo reboot
Verification
Get the IP.
open the terminal with
Ctrl
+Alt
+T
and tap the command below:$ ifconfig
you will see a interface named
ppp0
.Check ip route
$ ip route default dev ppp0 scope link
Resolve domain
$ nslookup DOMAIN
Visit website
$ curl DOMAIN