Advertisement
Guest User

Untitled

a guest
May 29th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. iptables -F
  2. iptables -t nat -F
  3. iptables -t mangle -F
  4. iptables -X
  5.  
  6. iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o vmbr0 -j SNAT --to-source 'x.x.x.x
  7. iptables -t nat -A POSTROUTING -o vmbr1 -j SNAT --to-source 192.168.0.1
  8.  
  9. iptables -t nat -I PREROUTING -p udp -m udp --dport 60000:61000 -j DNAT --to 192.168.0.200:60000-61000
  10.  
  11. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -d 'x.x.x.x --dport 18180 -j DNAT --to 192.168.0.200:22
  12. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -d 'x.x.x.x --dport 17172 -j DNAT --to 192.168.0.102:22
  13. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -d 'x.x.x.x --dport 17171 -j DNAT --to 192.168.0.101:22
  14. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -d 'x.x.x.x --dport 3000 -j DNAT --to 192.168.0.101:3000
  15. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -d 'x.x.x.x --dport 443 -j DNAT --to 192.168.0.200:443
  16. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -d 'x.x.x.x --dport 80 -j DNAT --to 192.168.0.1:80
  17.  
  18. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -s y.y.y.y -d 'x.x.x.x --dport 8080 -j DNAT --to 192.168.0.102:80
  19. iptables -A PREROUTING -t nat -i vmbr0 -p tcp -s y.y.y.y -d 'x.x.x.x --dport 8081 -j DNAT --to 192.168.0.102:8081
  20.  
  21. iptables -A INPUT -p TCP --dport 80 -j ACCEPT
  22. iptables -A OUTPUT -p TCP --dport 80 -j ACCEPT
  23. iptables -A INPUT -p TCP --dport 443 -j ACCEPT
  24. iptables -A OUTPUT -p TCP --dport 443 -j ACCEPT
  25. iptables -I INPUT -s 195.20.54.170 -j DROP
  26. iptables -A INPUT -s y.y.y.y -j ACCEPT
  27. iptables -A INPUT -i lo -j ACCEPT
  28. iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  29. #iptables -I INPUT 1 -p udp --dport 60000:61000 -j ACCEPT
  30. #iptables -A INPUT -p icmp --icmp-type echo-request -j REJECT --reject-with icmp-host-prohibited
  31. iptables -P INPUT DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement