Ensure local interface is configured.
sudo nano /etc/network/interfaces
# WAN for PPPOE
auto eth1
#iface eth1 inet dhcp
# LAN
auto eth0
iface eth0 inet static
address 192.168.1.250
network 255.255.255.0
Follow the screen after pppoeconf command
sudo pppoeconf
Say yes on this configure on /etc/ppp/peers/dsl-provider
Enter your username (provided by your ISP).
Enter your password (provided by your ISP).
If you already have a PPPoE Connection configured, you will be asked if it may be modified.
Popular options: you are asked if you want the ‘noauth’ and ‘defaultroute’ options and to remove ‘nodetach’ – choose “Yes”.
Use peer DNS – choose “Yes”.
Limited MSS problem – choose “Yes”.
When you are asked if you want to connect at start up, you will probably want to say yes. (This option does not work)
Finally you are asked if you want to establish the connection immediately.
Enable Forwarding.
sudo vim -c '%s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/gc' -c 'wq' /etc/sysctl.conf
sudo sysctl -p
View existing login ID & password
sudo cat /etc/ppp/chap-secrets
sudo cat /etc/ppp/pap-secrets
Ensure the file has the correct permissions. Sometimes the PPPoE Server won’t start if the file isn’t restricted enough
sudo chmod 600 /etc/ppp/chap-secrets
To start and stop your DSL connection
sudo pon dsl-provider
sudo poff dsl-provider
Reconnect when connection drops
sudo nano /etc/ppp/peers/dsl-providerpersist
sudo nano /etc/ppp/optionspersist
You may add these to your /etc/rc.local
# Enable MASQUERADE
sudo iptables -t nat -A POSTROUTING -s 192.168.x.x/24 -o wan -j MASQUERADE
# DNS Server
sudo echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolv.conf
# Set NIC speed and duplex full
sudo ethtool -s ethx speed 100 duplex full autoneg off
Troubleshooting:
plog
ifconfig ppp0
#Change speed to 100 only if 1000 doesn't work
sudo ethtool -s eth0 autoneg off speed 100 duplex full
You may comment out wan interface dhcp to speed up boot process
sudo nano /etc/network/interfaces
auto ethx# iface ethX inet dhcp