Routing Issue
Posted: Mon Aug 29, 2011 3:40 am
Hello,
So my OpenVPN server seems to be receiving the traffic that I'm sending it, but not returning anything. I tried fixing this by adding a route from the client to the server's LAN, but now it's throwing an error:
My server config file is:
the client:
I have been debugging it with both firewalls turned off and both the routers have been configured to allow udp connections through port 1194.
Help is much appreciated.
So my OpenVPN server seems to be receiving the traffic that I'm sending it, but not returning anything. I tried fixing this by adding a route from the client to the server's LAN, but now it's throwing an error:
Code: Select all
Sun Aug 28 22:20:34 2011 us=927375 WARNING: potential route subnet conflict between local LAN [192.168.1.0/255.255.255.0] and remote VPN [192.168.1.0/255.255.255.0]
Sun Aug 28 22:20:34 2011 us=927521 /sbin/route add -net 192.168.1.1 netmask 255.255.255.0 gw 192.168.2.101
route: netmask doesn't match route address
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables
route [-v] [-FC] {add|del|flush} ... Modify routing table for AF.
route {-h|--help} [<AF>] Detailed usage syntax for specified AF.
route {-V|--version} Display version/author and exit.
-v, --verbose be verbose
-n, --numeric don't resolve names
-e, --extend display other/more information
-F, --fib display Forwarding Information Base (default)
-C, --cache display routing cache instead of FIB
<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25)
netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP)
x25 (CCITT X.25)
Sun Aug 28 22:20:34 2011 us=930289 ERROR: Linux route add command failed: external program exited with error status: 4
Code: Select all
port 1194
proto udp
dev tap0
up "/etc/openvpn/up.sh br0"
down "/etc/openvpn/down.sh br0"
script-security 2
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key # This file should be kept secret
dh /etc/openvpn/dh1024.pem
ifconfig-pool-persist ipp.txt
server-bridge 192.168.2.101 255.255.255.0 192.168.2.105 192.168.2.200
push "route 192.168.2.0 255.255.255.0"
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.1.1 255.255.255.0"
push "redirect-gateway local def1 bypass-dhcp"
client-to-client
keepalive 10 120
tls-auth /etc/openvpn/ta.key 0 # This file is secret
cipher BF-CBC # Blowfish (default)
comp-lzo
max-clients 50
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 4
mute 20
Code: Select all
client
dev tap
proto udp
remote 71.xxx.xxx.xxx 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/client1.crt
key /etc/openvpn/client1.key
ns-cert-type server
tls-auth /etc/openvpn/ta.key 1
cipher BF-CBC
comp-lzo
verb 5
Help is much appreciated.