Portwarding from my WiFi Wan to VM not working

yeshuah

New Member
Apr 15, 2024
1
0
1
Code:
source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto wlp0s20f3
iface wlp0s20f3 inet dhcp
        wireless-power off
        wpa-ssid xxxx
        wpa-psk  xxxx

iface eno1 inet manual

auto vmbr0
iface vmbr0 inet manual
        address 10.10.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0

        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o wlp0s20f3 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o wlp0s20f3 -j MASQUERADE

        post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
        post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1


# SSH Into main-server
post-up iptables -t nat -A PREROUTING -i wlp0s20f3 -p tcp --dport 2201 -j DNAT --to 10.10.10.5:22
post-down iptables -t nat -D PREROUTING -i wlp0s20f3 -p tcp --dport 2201 -j DNAT --to 10.10.10.5:22

So I'm attempting to to so ssh -p 2201 username@host and expecting to then be connected to the VMs default 22 port SSH. If I log into the host I can ssh into the VM with no issue - so the ssh server is set up. And the VM can also access the internet.

I get the error connect to address 192.168.0.74 port 2201: Network is unreachable

Is there anything obviously wrong with the config?