Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- the IP that came with my Server - lets say: 1.1.1.1 ("IP-1")
- and one that is routed to the same interface - lets say: 2.2.2.2 ("IP -2")
- auto lo
- iface lo inet loopback
- auto eth0
- iface eth0 inet static
- address 1.1.1.1/22
- dns-nameservers (what my hoster set for me)
- gateway (what my hoster set for me)
- broadcast (what my hoster set for me)
- netmask 255.255.252.0
- auto eth0:1
- iface eth0:1 inet static
- address 2.2.2.2
- netmask 255.255.255.255
- auto br1
- iface br1 inet static
- address 10.10.10.100
- netmask 255.255.255.0
- bridge_fd 0
- bridge_maxwait 0
- pre-up brctl addbr br1
- up iptables -t nat -F POSTROUTING
- up iptables -t nat -A PREROUTING -d 2.2.2.2/32 -j DNAT --to-destination 10.10.10.1
- up iptables -t nat -A POSTROUTING -s 10.10.10.0/24 -o eth0 -j MASQUERADE
- //PREROUTING (NATting)
- post-down iptables -F
- post-down iptables -t nat -F
- post-down brctl delbr br1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement