Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables --flush
- iptables --append INPUT --in-interface lo --jump ACCEPT
- iptables --append OUTPUT --out-interface lo --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto icmp --icmp-type echo-request --jump DROP
- iptables --append INPUT --in-interface eth0 --proto tcp --dport 22 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto tcp --sport 22 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto tcp --dport 80 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto tcp --sport 80 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto tcp --dport 443 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto tcp --sport 443 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto udp --sport 53 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto udp --dport 53 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto tcp --sport 53 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto tcp --dport 53 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto udp --sport 67 --dport 68 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto udp --sport 68 --dport 67 --jump ACCEPT
- iptables --append INPUT --in-interface eth0 --proto udp --sport 123 --jump ACCEPT
- iptables --append OUTPUT --out-interface eth0 --proto udp --dport 123 --jump ACCEPT
- iptables --policy INPUT DROP
- iptables --policy FORWARD DROP
- iptables --policy OUTPUT DROP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement