I'm having trouble with one of my VPN servers. As far as I can tell, I have set it up exactly like another server that I have that works just fine. I can connect with problem to the server from a client machine and the routing gets set on the client. I can ssh to the VPN server and I can then ssh to other machines on the network or out to the Internet, so the machine's routing is working. I have no iptables rules other than the nat setting. I can ping the server's IP address, the server's VPN address, my local VPN address, but not the p-t-p address (I don't think that makes any difference), but I cannot ping anything else on the server's IP network. I have no idea...
Here is my current setup:
cat /proc/sys/net/ipv4/ip_forward
1
netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.253.1 0.0.0.0 UG 0 0 0 eth0
172.30.255.0 172.30.255.2 255.255.255.0 UG 0 0 0 tun0
172.30.255.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.253.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
iptables --line-numbers -L -n -t nat
Chain PREROUTING (policy ACCEPT)
num target prot opt source destination
Chain INPUT (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
num target prot opt source destination
1 MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0
cat vpn.conf
proto udp
dev tun0
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/ca.crt
key /etc/openvpn/easy-rsa/keys/ca.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
server 172.30.255.0 255.255.255.0
push "route 192.168.253.0 255.255.255.0"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"
duplicate-cn
keepalive 30 600
comp-lzo
verb 4
ifconfig tun0
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:172.30.255.1 P-t-P:172.30.255.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:27 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:2268 (2.2 KB) TX bytes:0 (0.0 B)
The client's config:
client
dev tun
proto udp
remote server.com
resolv-retry infinite
nobind
ca ca.crt
cert my.crt
key my.key
comp-lzo
verb 4
Thanks,
Dave