I have the following setup:
- Router with Internet access
- Public static IP address
- Low functional
- Has a "Port forwarding" feature
- Local IP address: 192.168.1.1
- Linux server (Ubuntu) connected to VPN service (non-controllable by me), as the gateway for the client (3)
- Interface enp0s3: gw: 192.168.1.1; IP address: 192.168.1.10
- Interface tun0 - VPN connection
- Windows 7 client
- Network Interface: gw: 192.168.1.10; IP address: 192.168.1.8
iptables rules on server (2):
*nat
:PREROUTING ACCEP T [443:55918]
:INPUT ACCEPT [21:3328]
:OUTPUT ACCEPT [22:1600]
:POSTROUTING ACCEPT [73:4883]
-A POSTROUTING -s 192.168.1.8/32 -o tun0 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [2135:1080592]
:FORWARD ACCEPT [846:190487]
:OUTPUT ACCEPT [1592:396526]
-A FORWARD -s 192.168.1.8/32 -i tun0 -o enp0s3 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s 192.168.1.8/32 -i enp0s3 -o tun0 -j ACCEPT
COMMIT
How do I forward the port for a SSH connection to the client, through the external router's address? (I can't do this through the VPN).