Advertisement
Guest User

Untitled

a guest
Apr 7th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. # This file describes the network interfaces available on your system
  2. # and how to activate them. For more information, see interfaces(5).
  3.  
  4. # The loopback network interface
  5. auto lo
  6. iface lo inet loopback
  7.  
  8. # The primary network interface
  9. auto eth0
  10. iface eth0 inet static
  11. address 10.1.0.11
  12. netmask 255.255.0.0
  13. broadcast 10.1.255.255
  14. gateway 10.1.1.127
  15.  
  16. auto eth1
  17. iface eth1 inet static
  18. address 10.4.1.3
  19. netmask 255.255.255.0
  20. broadcast 10.4.1.255
  21. up ip rule add from 10.4.1.0/24 table dmz
  22. up ip route add 10.4.1.0/24 dev eth1 table dmz
  23. up ip route add default via 10.4.1.1 dev eth1 table dmz
  24. up ip route del 10.4.1.0/24 dev eth1 table main
  25. up iptables -A OUTPUT -s 10.1.0.0/16 -d 10.4.1.0/24 -j DROP
  26. up iptables -A OUTPUT -s 10.4.1.0/24 -d 10.1.0.0/16 -j DROP
  27. down ip rule del from 10.4.1.0/24 table dmz
  28. down ip route del 10.4.1.0/24 dev eth1 table dmz
  29. down ip route del default via 10.4.1.1 dev eth1 table dmz
  30. down iptables -D OUTPUT -s 10.1.0.0/16 -d 10.4.1.0/24 -j DROP
  31. down iptables -D OUTPUT -s 10.4.1.0/24 -d 10.1.0.0/16 -j DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement