ADSL Connection (PPTP) - Linux guide

[an error occurred while processing this directive]
  • These instructions were tested on RedHat 7.3, Kernel 2.4.18. 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

 

 

 

 

 

  • 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

 

Contents of pap-secrets:
# Secrets for authentication using PAP
# client server secret IP addresses
"user%ra@huji" "10.0.0.138 RELAY_PPP1 " "password"


Contents of chap-secrets:
# Secrets for authentication using CHAP
# client server secret IP addresses
"user%ra@huji" "10.0.0.138 RELAY_PPP1 " "password"

 

 

 

 

  • Add a line containing your:
    Username: username%ra@huji
        [username%tcs@huji for CS users]
    Dialup command: 10.0.0.138 RELAY_PPP1
    Password: fill your password (remember that you need to change the password every three months)
  • For PAP: Edit /etc/ppp/pap-secrets

  • For CHAP: Edit /etc/ppp/chap-secrets

Step

 

Contents of resolv.conf:
nameserver 128.139.6.1
nameserver 128.139.4.3

 

 

 

  • Set the DNS server addresses in /etc/resolv.conf to 128.139.6.1 and 128.139.4.3

Step

 

#pptp 10.0.0.138 --quirks=BEZEQ_ISRAEL debug user "user%ra@huji" remotename "10.0.0.138 RELAY_PPP1" defaultroute mtu 1452 mru 1452 noauth

 

 

 

  • Run the pptp client
    pptp 10.0.0.138 --quirks=BEZEQ_ISRAEL debug user "user%ra@huji" remotename "10.0.0.138 RELAY_PPP1" defaultroute mtu 1452 mru 1452 noauth

Viewing the connection configuration

 

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

 

 

 

  • After a few seconds the pptp connection will start working - you can see it using ifconfig. Pay attention to the ppp0 device, which is the public port connection interface.


Viewing the routing table

 

# route -v
Kernel IP routing table
Destination     Gateway   Genmask         Flags Metric Ref Use Iface
x59.dialin.huji *         255.255.255.255 UH    0      0   0   ppp0 
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default x59.dialin.huji 0.0.0.0 UG 0 0 0 ppp0


 

  • Check the routing table to see that the ppp0 interface was added as a default gateway
  • route -v

End the connection

 

# killall pppd

 

 

 

  • Hang up by killing the ppp daemon or using the following command: killall pppd



Last updated: 27/07/2011