Hello,
I have an openvpn server (10.8.0.1) and a client connected to it (10.8.0.10).
Now, I would like to access the client network (10.10.0.0/24) from my openvpn server, but cannot get it to work. The client should not be able to see the server network, though.
Both client and server can ping each other and the client can ping other machines on its local network. When I try to ping these machines from the server, it times out.
What I have done already on the client:
# sysctl -w net.ipv4.ip_forward=1
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.8.0.0/24 anywhere
On the server:
$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.10.0.0 10.8.0.10 255.255.255.0 UG 0 0 0 tun0
I don't know why it's not working. I added the necessary route on the server, allowed forwarding on the client and enabled masquerading... What else could I do?
Thanks in advance