Advertisement
Guest User

Untitled

a guest
May 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. iptables -t filter -F
  2. iptables -t filter -A INPUT -m state --state ESTABLISHED -j ACCEPT
  3. iptables -t filter -A INPUT -i lo -j ACCEPT
  4. iptables -t filter -A INPUT -p icmp -j ACCEPT
  5. iptables -t filter -A INPUT -p tcp -m tcp -m multiport --dports 53,26 -m state --state NEW -j ACCEPT
  6. iptables -t filter -A INPUT -p udp -m tcp -m multiport --dports 53,26 -m state --state NEW -j ACCEPT
  7. iptables -t filter -A INPUT -i eth0 -j ACCEPT
  8. iptables -t filter -A INPUT -i ppp0 -p udp -m udp --sport 53 -j ACCEPT
  9. iptables -t filter -A INPUT -p tcp -m tcp --dport 53 -j ACCEPT
  10. iptables -t filter -A INPUT -i ppp0 -p udp -m udp --sport 26 -j ACCEPT
  11. iptables -t filter -A INPUT -p tcp -m tcp --dport 26 -j ACCEPT
  12. iptables -t filter -A FORWARD -o ppp0 -p tcp -m tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:1536 -j TCPMSS --clamp-mss-to-pmtu
  13. iptables -t filter -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
  14. iptables -t filter -A FORWARD -p icmp -j ACCEPT
  15. iptables -t filter -A FORWARD -i eth0 -o ppp0 -m state --state NEW -j ACCEPT
  16. iptables -t filter -A OUTPUT -m state --state ESTABLISHED -j ACCEPT
  17. iptables -t filter -A OUTPUT -o lo -j ACCEPT
  18. iptables -t filter -A OUTPUT -o eth0 -j ACCEPT
  19. iptables -t filter -A OUTPUT -p icmp -j ACCEPT
  20. iptables -t filter -A OUTPUT -p tcp -m tcp -m multiport --dports 53,26 -m state --state NEW -j ACCEPT
  21. iptables -t filter -A OUTPUT -p udp -m tcp -m multiport --dports 53,26 -m state --state NEW -j ACCEPT
  22. iptables -P FORWARD ACCEPT
  23. iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 26 -j DNAT --to-destination 192.168.1.200
  24. iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 53 -j DNAT --to-destination 192.168.1.200
  25.  
  26. iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 26 -j DNAT --to-destination 192.168.1.200
  27. iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 53 -j DNAT --to-destination 192.168.1.200
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement