1

My setup is several VM's, with a local subnet (192.168.10.0/24)

Host machine is 192.168.10.1 (br1) (or 10.30.0.7 interface with inet) it runs a DHCP server to assign my VM's their IP's.

I don't want to bridge the connection like normal with brctl addif but instead I want the VM's to be able to connect to the internet sharing the host's IP (specifically 10.30.0.1 or interface wg0 (wireguard))

How can I do this with iptables?

Alex
  • 11
  • 1
  • 2
    You're looking for "[tag:nat]" (or possibly "masquerade"). I'm sure you'll find many answers here with that keyword – roaima Aug 04 '20 at 15:42
  • 2
    This simple rule does it https://unix.stackexchange.com/questions/78320/how-does-iptables-masquerade-work-on-the-incoming-side – Alex Aug 04 '20 at 21:10
  • that's good to hear you've found an answer. Can we mark yours as a duplicate? – roaima Aug 05 '20 at 15:05
  • 7
    Does this answer your question? [How does iptables MASQUERADE work on the incoming side?](https://unix.stackexchange.com/questions/78320/how-does-iptables-masquerade-work-on-the-incoming-side) – roaima Aug 05 '20 at 15:05

0 Answers0