SHARE
TWEET

Untitled

a guest Jul 19th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. the IP that came with my Server - lets say: 1.1.1.1 ("IP-1")
  2. and one that is routed to the same interface - lets say: 2.2.2.2 ("IP -2")
  3.      
  4. auto lo
  5. iface lo inet loopback
  6.  
  7. auto eth0
  8. iface eth0 inet static
  9.         address 1.1.1.1/22
  10.         dns-nameservers (what my hoster set for me)
  11.         gateway (what my hoster set for me)
  12.         broadcast (what my hoster set for me)
  13.         netmask   255.255.252.0
  14.  
  15. auto eth0:1
  16. iface eth0:1 inet static
  17.         address 2.2.2.2
  18.         netmask 255.255.255.255
  19.  
  20. auto  br1
  21. iface br1 inet static
  22.   address   10.10.10.100
  23.   netmask   255.255.255.0
  24.   bridge_fd 0
  25.   bridge_maxwait 0
  26.   pre-up brctl addbr br1
  27.   up iptables -t nat -F POSTROUTING
  28.  
  29.   up iptables -t nat -A PREROUTING -d 2.2.2.2/32 -j DNAT --to-destination 10.10.10.1
  30.  
  31.   up iptables -t nat -A POSTROUTING -s 10.10.10.0/24 -o eth0 -j MASQUERADE
  32.  
  33.   //PREROUTING (NATting)
  34.  
  35.   post-down iptables -F
  36.   post-down iptables -t nat -F
  37.   post-down brctl delbr br1
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top