[Resolved] Routing/Gateway Issue

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Locked
mc
OpenVpn Newbie
Posts: 2
Joined: Wed Nov 09, 2011 11:09 pm

[Resolved] Routing/Gateway Issue

Post by mc » Wed Nov 09, 2011 11:59 pm

Hi All,

Thanks for taking the time to help me :D

Im able to connect to the VPN server just fine but im not able to communicate with the private LAN from the client PC and vice versa

Im able to ping from
client PC > OpenVPN Server IP
Private LAN > OpenVPN Server IP
BUT NOT
client PC > Private LAN
Private LAN > Client PC

Here is the network info
Private LAN: 10.0.0.0/24
-> Ping Target: 10.0.0.253
OpenVPN LAN: 10.1.0.0/24
-> Server IP: 10.1.0.1
Client IP: 192.168.10.105/24

Thinking its a gateway issue i checked the ip info on the client PC and saw this
Default Gateway: (empty)

I changed the server.ovpn file to redirect all traffic through the VPN(in an attempt to get a propper gateway on the connection)
push "redirect-gateway def1 bypass-dhcp"
The gateway changed to 10.1.0.5(unpingable) This did not fix the issue

Here is the server file:
local 10.0.0.11
port 1194
proto tcp
dev tun
dev-node "tap-bridge"
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\server.key" # This file should be kept secret
dh "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\dh1024.pem"
server 10.1.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "route 10.0.0.0 255.255.255.0"
push "dhcp-option DNS 10.0.0.253"
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 6

Here is the Client:
client
dev tun
dev-node tap-bridge
proto tcp
remote x.x.x.x 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\Christopher.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\keys\\Christopher.key"
ns-cert-type server
cipher BF-CBC
comp-lzo
verb 6
Last edited by mc on Thu Nov 10, 2011 4:27 pm, edited 1 time in total.

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Routing/Gateway Issue

Post by maikcat » Thu Nov 10, 2011 7:46 am

hi there,

did you enable ip forwarding on openvpn server?

did you configure routing on your pcs inside your lan correctly?

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

mc
OpenVpn Newbie
Posts: 2
Joined: Wed Nov 09, 2011 11:09 pm

Re: Routing/Gateway Issue

Post by mc » Thu Nov 10, 2011 4:26 pm

Ip Forwarding was the problem

Thanks so much for your time Michael



for anyone else that has this problem here is how to enable IP Forwarding

Change the value of this reg key to 1 (is normally 0) and reboot
(HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\IPEnableRouter)

Locked