0

I would like client traffic to show publicly as originating from that specific IP (which could be a secondary IP assigned to the same network interface as primary).

iface eth0 inet static
    address 167.99.179.140/24
    gateway 167.99.179.1
iface eth0 inet static
    address 167.99.179.141/24
sunknudsen
  • 701
  • 3
  • 14
  • 28

1 Answers1

0

Figured it out!

I had to replace -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j MASQUERADE by -A POSTROUTING -s 10.0.2.0/24 -o eth0 -j SNAT --to-source 167.99.179.141 in /etc/iptables/rules.v4.

sunknudsen
  • 701
  • 3
  • 14
  • 28