Linux Router

Here we use a PC with linux operating system as router.

Of course you can use a router in StudNet. Here you can find tips on optimal settings.

IP Address Space

In our network you can use your own local subnetwork. You can use the IP address space 172.16.0.0/24 as private network. That are the IPs 172.16.0.0-172.16.0.255 . The most other private IP address spaces are used from our servers or from intern networks. So please do not use these!

VPN and Router

The router must establishes a VPN connection to the VPN gateway. Make two masquerading for all clients behind the router:

iptables -t nat -A POSTROUTING -o ppp0 -s 172.16.0.0/24 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth0 -s 172.16.0.0/24 -j MASQUERADE

ppp0 is the VPN device and eth0 is the external device with a IP address of the IP address space 192.168.0.0/16 .

Why I cannot open some web pages?

Possibly the Path-MTU-Discovery of a badly configured third party firewall do not works. It can make problems at the access of a server because the MTU of VPN connection is < 1500 . You can have the same problem, if you use a DSL connection that use PPPOE.
There are some ways to solve this problem.:

  • Decrease MTU of clients to for example 1400
  • Use the proxy server for http traffic
  • Recurve MTU/MSS to the own router

How to recurve you can read at the following line:

iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu