OpenVPN config with pushed subnet

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.
Post Reply
Farokh
OpenVpn Newbie
Posts: 3
Joined: Mon Nov 16, 2015 8:13 pm

OpenVPN config with pushed subnet

Post by Farokh » Mon Nov 16, 2015 8:52 pm

I'm trying to set up a (in my opinion) fairly simple OpenVPN server and client, but I'm failing and I'm not sure why.

I have an Ubuntu machine with 2 ethernet ports. eth0 has an ip of 192.168.1.10 and has UDP port 1194 forwarded to it by the router at 192.168.1.1. eth1 has 192.168.82.5 and is connected to another LAN with other 192.168.82.x machines on it. OpenVPN uses 10.85.230.0/24 for its IP subnet. I'm pushing 192.168.82.0/24 to the client and I've enable ip_forward. I have also set up a static route on my 192.168.82.1 router so that packets for 10.85.230.0/24 are sent to 192.168.82.5.

I've set up a test client on Mac OS X, and I'm able to bring the VPN up. From the client, which is 10.85.230.2, I can ping 10.85.230.1, and I can ping 192.168.82.5, but I'm unable to ping 192.168.82.4 (which is another machine on the .82 network).

My server config is (comments have been removed):

Code: Select all

port 1194
proto udp
dev tun
ca easy-rsa/keys/ca.crt
cert easy-rsa/keys/server.crt
key easy-rsa/keys/server.key  # This file should be kept secret
dh easy-rsa/keys/dh2048.pem
topology subnet
server 10.85.230.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.82.0 255.255.255.0"
keepalive 10 120
cipher BF-CBC
comp-lzo
max-clients 100
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log-append  openvpn.log
verb 5
mute 20
My client config is:

Code: Select all

client
dev tun
proto udp
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
ca ca.crt
cert eduval.crt
key eduval.key
ns-cert-type server
cipher BF-CBC
comp-lzo
verb 3
What am I missing?

Thanks!

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: OpenVPN config with pushed subnet

Post by Traffic » Thu Nov 19, 2015 1:10 am

Farokh wrote:I've enable ip_forward. I have also set up a static route on my 192.168.82.1 router so that packets for 10.85.230.0/24 are sent to 192.168.82.5.

I've set up a test client on Mac OS X, and I'm able to bring the VPN up. From the client, which is 10.85.230.2, I can ping 10.85.230.1, and I can ping 192.168.82.5, but I'm unable to ping 192.168.82.4
Check firewall on 192.168.82.4

Farokh
OpenVpn Newbie
Posts: 3
Joined: Mon Nov 16, 2015 8:13 pm

Re: OpenVPN config with pushed subnet

Post by Farokh » Fri Nov 20, 2015 1:39 am

I can ping 192.168.82.4 (in fact any of the machines that I have on 192.168.82.x) from 192.168.82.5, just not from the client machine at the other end of the OpenVPN tunnel.

Thanks.

Farokh
OpenVpn Newbie
Posts: 3
Joined: Mon Nov 16, 2015 8:13 pm

Re: OpenVPN config with pushed subnet

Post by Farokh » Fri Dec 04, 2015 3:25 pm

Another bit I just discovered, I can ping 192.168.82.1 as well as 192.168.82.5 from the client, but not 192.168.82.4, .3, or .2, all of which I can ping from the machine that is the openvpn server.

Post Reply