Forward a port using iptables to a client reddit / selfhosted ---------------------------------------------------------------------- albertoZurini · 2023-11-09 16:05 I have a Proxmox server with a public IP and I've created a bridge `vmbr1` for the virtual machines (since I only have one public IP). I'd like to expose some ports, but I don't know how. I tried this command with no success: `iptables -t nat -A PREROUTING -i enp3s0\] -p tcp --sport 10122 --dport 22 -j DNAT --to-destination [10.0.1.11](https://10.0.1.11)` I was able to set up the NAT with the following entries on \`/etc/network/interfaces\`: ``` post-up echo 1 > /proc/sys/net/ipv4/ip\_forward post-up iptables -t nat -A POSTROUTING -s '[10.0.0.0/8](https://10.0.0.0/8)' -o enp3s0 -j MASQUERADE post-down iptables -t nat -D POSTROUTING -s '[10.0.0.0/8](https://10.0.0.0/8)' -o enp3s0 -j MASQUERADE ``` Do you have any recommendation? ---------------------------------------------------------------------- thekrautboy · 2023-11-09 16:10 /r/LinuxQuestions /r/Linux4Noobs /r/HomeNetworking ---------------------------------------------------------------------- selfhosted-ModTeam · 2023-11-09 18:50 This post is being removed due to the subject not being related to the "selfhosted" theme of the community. Please message the mods if you have any questions or believe this removal has been in error.