Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.14 KB | None | 0 0
  1. ###############
  2. # UWAGA!!
  3. # wszystkie wpisy zostaną usunięte.
  4. ###############
  5.  
  6. iptables -F
  7. iptables -F -t nat
  8. iptables -F -t mangle
  9. iptables -X
  10.  
  11.  
  12. #iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE
  13. #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
  14.  
  15. iptables -P FORWARD ACCEPT
  16. iptables -P OUTPUT ACCEPT
  17.  
  18. iptables -t nat -A PREROUTING -p tcp -s 0/0 -d 91.121.161.152 --dport 80 -j DNAT --to-destination 10.0.0.10:80
  19. iptables -t nat -A POSTROUTING -o eth0 -d 91.121.161.152 -j SNAT --to-source 10.0.0.10
  20. iptables -A FORWARD -p tcp -s 10.0.0.10 --sport 80 -j ACCEPT
  21. iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o eth0 -j SNAT --to-source 91.121.161.152
  22.  
  23.  
  24. #iptables -t nat -I PREROUTING -p tcp -d 91.121.161.152 --dport 80 -j DNAT --to 10.0.0.10:80
  25. #iptables -A FORWARD -p tcp -d 10.0.0.10 --dport 80 -j ACCEPT
  26.  
  27.  
  28. iptables -t nat -I PREROUTING -p tcp -d 91.121.161.152 --dport 443 -j DNAT --to 10.0.0.11:443
  29. iptables -A FORWARD -p tcp -d 10.0.0.11 --dport 443 -j ACCEPT
  30.  
  31. iptables -t nat -I PREROUTING -p tcp -d 91.121.161.152 --dport 8000 -j DNAT --to 10.0.0.10:8000
  32. iptables -A FORWARD -p tcp -d 10.0.0.10 --dport 8000 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement