I can't port forward from WAN to VPN Client. VPN Client Ubuntu 18 192.168.0.16 Port 6000
VPN Gateway for LAN clients Centos 192.168.0.12
Router 192.168.0.1
I can forward to the VPN Client if VPN is not connected if I forward Port 6000 from 192.168.0.1 directly to 192.168.0.16.
While it's connected to VPN it is not working, so I have tried to add to following rule on the VPN Gateway 192.168.0.12 and forward from 192.168.0.1 to 192.168.0.12
I would use port forwarding for this task instead of IPTables
example
#Establishes tunnel through 192.168.0.12 to 192.168.0.16
ssh -fMNS /usr/lib/systemd/system/vpn.socket -L 6000:192.168.0.16:6000 192.168.0.12 #Connect VPN client to server using port 6000 on loopback interface
VPNClient 127.0.0.1:6000 #Close socket ssh connection when done
ssh -S /usr/lib/systemd/system/vpn.socket -O exit 192.168.0.12
This is how I would do it, but what do I know? I'm freaking 1337