Point to Point VPN
Posted: Mon Apr 22, 2013 4:45 am
Hi, I've been setting up roadwarior VPN's using TLS + shared key's and username/passwords for a while with great success. However I'm now trying to do a point to point network between 3 sites and having a routing issue which I can't place.
VPN subnet: 10.9.0.0/24
Server has 10.208.x.x subnet's
Client has 192.168.100.0 subnet's
I'm running VPN Server on Ubuntu 12.04. (It has 2 VPN's, one for road warrior config, and the other for point to point). The server actually has 5 subnet's I'm hoping to hook up and make available to client B.
P2P server config:
Client config:
Server cat /proc/sys/net/ipv4/ip_forward = 1
And I've also added these iptables (which is vanila default ACCEPT right now) has these rules added:
iptables -I FORWARD -i tun0 -s 10.9.0.0/24 -m conntrack --cstate NEW -j ACCEPT
iptables -I FORWARD -i tun1 -s 10.9.0.0/24 -m conntrack --cstate NEW -j ACCEPT
iptables -I FORWARD -s 10.9.0.0/24 -j ACCEPT
Client side I have an issue with iptables that I dont understand. (It's a build by a hosting provider who aren't being helpful)
iptables -L
gives this output:
FATAL: Error inserting ip_tables (/lib/moduels/...../iptables.ko): Operation not permitted
iptables v1.4.12: can't initialize iptables table 'filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
The VPN actually connects fine.
From client I can ping 10.208.134.12 and 10.9.0.1 (the server) but nothing else on the client subnet
From the server I can ping 192.168.100.223 and 10.9.0.4 (the client) but nothing else on the server subnet
The client subnet route is not added to the server routes despite having route, push route, and iroute (in ccd) commands in place
The server subnet's (all 5) are added to the client fine.
Can anyone help with that? I'm a bit lost trying to debug it.
VPN subnet: 10.9.0.0/24
Server has 10.208.x.x subnet's
Client has 192.168.100.0 subnet's
I'm running VPN Server on Ubuntu 12.04. (It has 2 VPN's, one for road warrior config, and the other for point to point). The server actually has 5 subnet's I'm hoping to hook up and make available to client B.
P2P server config:
Code: Select all
port 5195
proto udp
dev tun
ca /etc/openvpn/rsa/ca.crt
pkcs12 /etc/openvpn/rsa/server.p12
dh dh2048.pem
#tls-auth /etc/openvpn/rsa/tls-auth.key
server 10.9.0.0 255.255.255.0
status /var/log/openvpn-status2.log
ifconfig-pool-persist ipp.vpn2
#persist-remote-ip
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 10 120
cipher AES-256-CBC
comp-lzo
max-clients 30
user nobody
group nogroup
persist-key
persist-tun
verb 5
topology subnet
# ProdAuthTier
push "route 10.208.134.0 255.255.255.0"
push "dhcp-option DNS 10.208.134.13"
push "dhcp-option DNS 10.208.134.14"
push "dhcp-option WINS 10.208.134.13"
push "dhcp-option WINS 10.208.134.14"
push "dhcp-option DOMAIN aus.lan"
# ProdOtherTier
push "route 10.208.217.0 255.255.255.0"
# ProdDbTier
push "route 10.208.81.0 255.255.255.0"
# ProdAppTier
push "route 10.208.165.0 255.255.255.0"
# ProdWebTier
push "route 10.208.195.0 255.255.255.0"
# other routes
#push "route 10.20.0.0 255.255.255.0 10.9.0.2"
route 10.20.1.0 255.255.255.0
push "route 10.20.1.0 255.255.255.0"
route 192.168.100.0 255.255.255.0
push "route 192.168.100.0 255.255.255.0"
Code: Select all
client
tls-client
dev tun
dev-type tun
proto udp
remote server.myurl.com 5195
tls-remote server.myurl.com
ca /etc/openvpn/ca.crt
key /etc/openvpn/clientb.key
cert /etc/openvpn/clientb.crt
user nobody
group nogroup
#script-security 3
resolv-retry infinite
#daemon
persist-key
persist-tun
writepid /etc/openvpn/vpn.pid.didata
status /etc/openvpn/vpn.status.didata
cipher AES-256-CBC
comp-lzo
mtu-test
verb 5
And I've also added these iptables (which is vanila default ACCEPT right now) has these rules added:
iptables -I FORWARD -i tun0 -s 10.9.0.0/24 -m conntrack --cstate NEW -j ACCEPT
iptables -I FORWARD -i tun1 -s 10.9.0.0/24 -m conntrack --cstate NEW -j ACCEPT
iptables -I FORWARD -s 10.9.0.0/24 -j ACCEPT
Client side I have an issue with iptables that I dont understand. (It's a build by a hosting provider who aren't being helpful)
iptables -L
gives this output:
FATAL: Error inserting ip_tables (/lib/moduels/...../iptables.ko): Operation not permitted
iptables v1.4.12: can't initialize iptables table 'filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
The VPN actually connects fine.
From client I can ping 10.208.134.12 and 10.9.0.1 (the server) but nothing else on the client subnet
From the server I can ping 192.168.100.223 and 10.9.0.4 (the client) but nothing else on the server subnet
The client subnet route is not added to the server routes despite having route, push route, and iroute (in ccd) commands in place
The server subnet's (all 5) are added to the client fine.
Can anyone help with that? I'm a bit lost trying to debug it.