Server Configuration
### network options
port 1194
proto udp
dev tun
### certificate and key files
ca /etc/openvpn/privnet/ca.crt
cert /etc/openvpn/privnet/server.crt
key /etc/openvpn/privnet/server.key
dh /etc/openvpn/privnet/dh.pem
### (optional) use a shared key to initialize TLS negotiation
tls-auth /etc/openvpn/privnet/shared.key
### VPN subnet
server 172.16.1.0 255.255.255.0
### (optional) make local network behind the VPN server accessible for the VPN clients
#push "route 72.20.12.0 255.255.255.0"
#route-up "route delete -net 172.16.1.0/24"
#route-up "route add -net 172.16.1.0/24 tun0"
#push "route 172.16.1.0 255.255.255.0"
### (optional) make the VPN server a gateway for the internet for the VPN clients
push "redirect-gateway def1"
### (optional) compression (might make your WRT sluggish or not, depending on the model and what you have running...)
push "dhcp-option DNS 4.2.2.1"
push "dhcp-option DNS 4.2.2.2"
comp-lzo
keepalive 10 120
status /tmp/openvpn.status
Client Configuration
client
dev tun
proto udp
remote 72.20.X.X 1194
nobind
### (optional) degrade privileges to this user and group after initialization
#user nobody
#group nogroup
ca ca.crt
cert client.crt
key client.key
dh dh.pem
### (optional) use a shared key to initialize TLS negotiation
tls-auth shared.key
### (optional) compression (use only if the server has it)
comp-lzo
Linux Route
[root@server openvpn]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
212.199.254.98 - 255.255.255.255 !H 0 - 0 -
172.16.1.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
72.20.4.0 0.0.0.0 255.255.255.252 U 0 0 0 eth0
172.16.1.0 172.16.1.2 255.255.255.0 UG 0 0 0 tun0
72.20.12.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 72.20.4.1 0.0.0.0 UG 0 0 0 eth0
[root@server openvpn]#
Windows Route
C:\Documents and Settings\Farrukh Ahmed>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x30002 ...00 08 02 5d 6a ee ...... Intel(R) PRO/100 VM Network Connection - Pac
ket Scheduler Miniport
0x40003 ...00 ff e0 29 cf 13 ...... TAP-Win32 Adapter V8 - Packet Scheduler Mini
port
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.4 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.4 192.168.1.4 20
192.168.1.4 255.255.255.255 127.0.0.1 127.0.0.1 20
192.168.1.255 255.255.255.255 192.168.1.4 192.168.1.4 20
224.0.0.0 240.0.0.0 192.168.1.4 192.168.1.4 20
255.255.255.255 255.255.255.255 192.168.1.4 192.168.1.4 1
255.255.255.255 255.255.255.255 192.168.1.4 40003 1
Default Gateway: 192.168.1.1
===========================================================================
Persistent Routes:
None
C:\Documents and Settings\Farrukh Ahmed>