client can't access server via tun0, eth0 okay

This forum is for admins who are looking to build or expand their OpenVPN setup.

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
dimm0k
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 01, 2013 1:03 am

client can't access server via tun0, eth0 okay

Post by dimm0k » Mon Jul 01, 2013 1:32 am

So I have almost successfully configured OpenVPN on a Linux machine and am able to connect to it via a client in Windows, however the server can ping the client via tun0 and eth0, but on the other side the client can only ping the server via eth0. The server's IP address via eth0 is 192.168.11.1 and via tun0 it's 10.8.1.1. The client via "eth0" is 192.168.1.14 and via tun0 it's 10.8.1.10. My server.conf is as follows:

Code: Select all

port 25794
proto udp
dev tun
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/alpha.crt
key /etc/openvpn/keys/alpha.key  # This file should be kept secret
dh /etc/openvpn/certs/dh2048.pem
server 10.8.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.11.0 255.255.255.0"
client-config-dir ccd
route 192.168.1.0 255.255.255.0
route 10.8.1.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
keepalive 10 120
tls-auth /etc/openvpn/keys/alpha-ta.key
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
chroot /etc/openvpn/jail
The file in my ccd directory contains

Code: Select all

ifconfig-push 10.8.1.40 10.8.1.1
iroute 192.168.1.0 255.255.255.0
Am I missing something?

Other issues I also noticed is that the client never gets 10.8.1.40 despite the ifconfig-push and computers on the server's LAN can't see the client...

dimm0k
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 01, 2013 1:03 am

Re: client can't access server via tun0, eth0 okay

Post by dimm0k » Mon Jul 01, 2013 3:00 am

Since I can't edit my original post, I have a correction/fix to the wording. Looks like originally I could ping from the server to the client via tun0 and also from the client to the server via eth0. I couldn't ping the server via tun0, but that apparently was because the firewall on the server wasn't allowing it. That has been corrected. I take it that the server should not be able to ping the client via eth0?

Post Reply