[OpenVPN home] [Date Prev] [Date Index] [Date Next]
[OpenVPN mailing lists] [Thread Prev] [Thread Index] [Thread Next]
Google
 
Web openvpn.net

[Openvpn-users] VPN -> gateway


  • Subject: [Openvpn-users] VPN -> gateway
  • From: "Benjamin Dickgiesser" <benjamin@xxxxxxxxxxxxxxx>
  • Date: Sat, 17 Jan 2004 12:53:51 +0100

Situation:
I am useing a Windows XP PC and want to connect to the internet via a vpn connection.
Plan:
Create a VPN with an outside suse linux 9 server with a static ip and use this pc as a gateway to get into the internet.
Solutions like SSH port forwarding are not useful to me since I want to be able to connect to any server on any port.
          144.82.201.0/23
User ---> |FIREWALL| --->(  Internet   )
 |                                      /\   | |
 |                                      | |   \/
 |----------------VPN----------> Linux Server
           10.3.0.0/24
User:
[VPN]
IP:            10.3.0.2/24
Gateway:  10.3.0.1
[Network]
IP:                144.82.200.116/23
Nameserver:  144.82.100.1
                    144.82.100.41
Linux Server:
[VPN]interface tun0
IP:             10.3.0.1/24
[Internet] - interface eth0:
IP:                217.172.172.111/24
Nameserver:  217.172.166.7
                    217.172.191.7
Gateway:      217.172.172.1 
What I have done:
I created a tunnel between the 2 pc's with openvpn.
Problem:
How do I setup the Suse Linux PC in order that it works properly as a gateway and is there anything else to do on the Windows pc (route add?).
I tried the following without a success:
I have to add that I'm a total linux nub and that I got this information from: http://www.yolinux.com/TUTORIALS/LinuxTutorialIptablesNetworkGateway.html
   On Linux PC:
   iptables --flush            - Flush all the rules in filter and nat tables
   iptables --table nat --flush
   iptables --delete-chain     - Delete all chains that are not in default filter and nat table
   iptables --table nat --delete-chain
  
   iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
   iptables --append FORWARD --in-interface tun0 -j ACCEPT
   echo 1 > /proc/sys/net/ipv4/ip_forward
  
   route add  -net 10.3.0.0 netmask 255.255.255.0 gw 217.172.172.1 dev tun0
   > SIOCADDRT:: Network not reachable.
Could someone help me with this?
Thanks alot!
Benjamin Dickgießer