ADSL Connection (PPPoE) - Linux guide

Notes:

  • These instructions were tested on RedHat 8.0, Kernel 2.4.22. Older systems may need to update the ppp daemon.
  • If you have more than one ethernet adapter installed replace "eth0" with the correct setting throughout the guide.
  • Some of the installation requires root access. It is advised to create backups of files modified during the installation prior to the modification.

Step

Step

 

#ifconfig eth0 10.200.1.1 netmask 255.0.0.0 broadcast 10.255.255.255

 

 

 

 

  • Although PPPoE does not require an IP address to be set for your Ethernet adapter some distributions may not initialize the adapter without it.

  • Set your Ethernet adapter ifconfig eth0 10.200.1.1 netmask 255.0.0.0 broadcast 10.255.255.255
  • If you have more than one Ethernet adapter installed replace eth0 with the correct setting.

Step

 

# adsl-script

 

 

 

  • Set up the ADSL connection using the adsl-setup script.

Step

 

LOGIN NAME
Enter your Login Name: user%ra@huji

 

 

 

  • Enter your username in the format: user%ra@huji
    [CS users: username%tcs@huji]

Step

 

INTERFACE
Enter the Ethernet interface connected to the ADSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethX, where 'X' is a number. (default eth0):

 

 

 

  • The Ethernet interface is usually named eth0 - if it is named differently enter the corrected value.

Step

 

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):

 

 

 

  • Choose no.

Step

 

DNS

Please enter the IP address of your ISP's primary DNS server.
If your ISP claims that 'the server will provide dynamic 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: 128.139.4.3
Please enter the IP address of your ISP's secondary DNS server.
If you just press enter, I will assume there is only one DNS server.
Enter the secondary DNS server address here: 128.139.6.1

 

 

  • Enter DNS addresses:
    • Primary: 128.139.6.1
    • Secondary: 128.139.4.3

Step

 

PASSWORD

Please enter your Password:
Please re-enter your Password:

 

 

  • Run adsl-setup again

  • Enter your password (remember you need to change password every three months)

Step

 

USERCTRL

Please enter 'yes' (two letters, lower-case.) if you want to allow normal user to start or stop DSL connection (default yes): yes

 

 

  • Set USERCTRL to yes

Step

 

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): 0

 

 

  • Do not use firewall

Step

 

Start this connection at boot time

Do you want to start this connection at boot time?
Please enter no or yes (default no):no

 

 

  • Do not start connection at boot time

Step

 

** Summary of what you entered **

Ethernet Interface: eth0
User name: user%ra@huji
Activate-on-demand: Yes; idle timeout = yes seconds Primary DNS: 128.139.6.1
Secondary DNS: 128.139.4.3
Firewalling: NONE
User Control: yes

Accept these settings and adjust configuration files (y/n)? y

 

 

  • Verify the connection details and confirm

Step

 

Adjusting /etc/sysconfig/network-scripts/ifcfg-ppp0
Adjusting /etc/resolv.conf
(But first backing it up to /etc/resolv.conf.bak)
Adjusting /etc/ppp/chap-secrets and /etc/ppp/pap-secrets
(But first backing it up to /etc/ppp/chap-secrets.bak)
(But first backing it up to /etc/ppp/pap-secrets.bak)

Congratulations, it should be all set up!

Type '/sbin/ifup ppp0' to bring up your xDSL link and '/sbin/ifdown ppp0' to bring it down.
Type '/sbin/adsl-status /etc/sysconfig/network-scripts/ifcfg-ppp0' to see the link status.

 

 

  • If everything is properly set up you'll be presented with the following message:

Step

 

#/sbin/ifup ppp0

 

 

  • You may now bring up the aDSL connection by typing: /sbin/ifup ppp0

Viewing the connection

 

# ifconfig
eth0 Link encap:Ethernet HWaddr 00:L0:BZ:T3:R0:00
inet addr:10.200.1.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19094 errors:0 dropped:0 overruns:0 frame:0
TX packets:28766 errors:0 dropped:0 overruns:0 carrier:0
collisions:5 txqueuelen:100
RX bytes:21048177 (20.0 Mb) TX bytes:2125100 (2.0 Mb)
Interrupt:10 Base address:0x4000
    
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:22 errors:0 dropped:0 overruns:0 frame:0
TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1302 (1.2 Kb) TX bytes:1302 (1.2 Kb)
    
    ppp0 Link encap:Point-to-Point Protocol
inet addr:200.32.10.125 P-t-P:200.32.10.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1452 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:58 (58.0 b) TX bytes:92 (92.0 b)


 

  • Check the connection by typing:
  • ifconfig

End the connection

 

# /sbin/ifdown ppp0

 

 

 

  • Hang up by killing the ppp daemon or using the following command: /sbin/ifdown ppp0



Last updated: 27/07/2011