Advertisement
Guest User

iptable

a guest
May 24th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. iptables --flush
  2. iptables --append INPUT --in-interface lo --jump ACCEPT
  3. iptables --append OUTPUT --out-interface lo --jump ACCEPT
  4. iptables --append OUTPUT --out-interface eth0 --jump ACCEPT
  5. iptables --append INPUT --in-interface eth0 --proto icmp --icmp-type echo-request --jump DROP
  6. iptables --append INPUT --in-interface eth0 --proto tcp --dport 22 --jump ACCEPT
  7. iptables --append OUTPUT --out-interface eth0 --proto tcp --sport 22 --jump ACCEPT
  8. iptables --append INPUT --in-interface eth0 --proto tcp --dport 80 --jump ACCEPT
  9. iptables --append OUTPUT --out-interface eth0 --proto tcp --sport 80 --jump ACCEPT
  10. iptables --append INPUT --in-interface eth0 --proto tcp --dport 443 --jump ACCEPT
  11. iptables --append OUTPUT --out-interface eth0 --proto tcp --sport 443 --jump ACCEPT
  12. iptables --append INPUT --in-interface eth0 --proto udp --sport 53 --jump ACCEPT
  13. iptables --append OUTPUT --out-interface eth0 --proto udp --dport 53 --jump ACCEPT
  14. iptables --append INPUT --in-interface eth0 --proto tcp --sport 53 --jump ACCEPT
  15. iptables --append OUTPUT --out-interface eth0 --proto tcp --dport 53 --jump ACCEPT
  16. iptables --append INPUT --in-interface eth0 --proto udp --sport 67 --dport 68 --jump ACCEPT
  17. iptables --append OUTPUT --out-interface eth0 --proto udp --sport 68 --dport 67 --jump ACCEPT
  18. iptables --append INPUT --in-interface eth0 --proto udp --sport 123 --jump ACCEPT
  19. iptables --append OUTPUT --out-interface eth0 --proto udp --dport 123 --jump ACCEPT
  20. iptables --policy INPUT DROP
  21. iptables --policy FORWARD DROP
  22. iptables --policy OUTPUT DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement