Connecting from public ports / Dormitories

A guide for Linux users

Notes:

  • 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

 

Contents of ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

 

 

 

 

  • Set your network interface card to obtain an IP address from a DHCP server.

  • Edit /etc/sysconfig/network-scripts/ifcfg-eth0

  • Renew the IP lease using the command pump or by restarting the DHCP client daemon (dhcpcd -k;dhcpcd -n)

  • Verify that the interface got an address from the 10.x.x.x range with ifconfig.

Step

 

Contents of pap-secrets:
# Secrets for authentication using PAP
# client server secret IP addresses
"user%ra" "10.X.0.1" "password"


Contents of chap-secrets:
# Secrets for authentication using CHAP
# client server secret IP addresses
"user%ra" "10.X.0.1" "password"

 

 

 

 

  • Add a line containing your:
    Username: username%ra
    Dialup command:
    according to the campus you are connecting from
    • Ein-Karem: 10.3.0.1
    • Edmond J. Safra Campus: 10.1.0.1
    • Mt. Scopus: 10.2.0.1
    • Rehovot: 10.4.0.1
    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

 

# route del -net 0.0.0.0

 

 

 

  • Remove the private network default route
    route del -net 0.0.0.0

Step

 

# pptp 10.X.0.1 debug user "user%ra" remotename "10.X.0.1" defaultroute mtu 1452 mru 1452 noauth

 

 

 

  • Run the pptp client
    pptp 10.X.0.1 debug user "user%ra" remotename "10.X.0.1" defaultroute mtu 1452 mru 1452 noauth
    (Note: 10.X.0.1 is according to the list in step 3)

Viewing the connection configuration

 

# ifconfig

eth0 Link encap:Ethernet HWaddr 00:L0:BZ:T3:R0:00
inet addr:10.0.0.221 Bcast:10.0.255.255 Mask:255.255.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.0 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