I have:
- OpenVPN server 10.14.0.1
- First client 10.14.0.2, which runs:
- qemu VM with 10.29.0.15,
- Second client (me) with 10.14.0.14.
All machines runs *nix OS. I want to SSH into VM.
How to achieve that?
What I’ve done:
On the OpenVPN server:
add these lines:
client-to-client
client-config-dir ccd
route 10.14.0.0 255.255.255.0
push "route 10.14.0.0 255.255.255.0"
add into ccd/devel
ifconfig-push 10.14.0.2 255.255.255.0
iroute 10.29.0.0 255.255.255.0
And at 10.14.0.2:
iptables -t nat -I POSTROUTING -o virbr0 -s 10.14.0.0/24 -j MASQUERADE
I can ping 10.14.0.2 from 10.14.0.14. When I ping 10.29.0.15 it returns: Destination Port Unreachable
I can see pings with a tcpdump on 10.14.0.2:
# tcpdump -qni tun0 icmp
14:45:06.711042 IP 10.14.0.14 > 10.29.0.15: ICMP echo request, id 10213, seq 5247, length 64
14:45:06.711100 IP 10.14.0.2 > 10.14.0.14: ICMP 10.29.0.15 protocol 1 port 19580 unreachable, length 92
I can ping 10.14.0.14 from 10.29.0.15
What am I missing/don’t understand?