Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables -P INPUT ACCEPT
- iptables -F
- iptables -I INPUT 1 -i lo -j ACCEPT -m comment --comment 'Enable connections on loopback devices.'
- iptables -I INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -m comment --comment 'Always allow established connections to remain connected.'
- iptables -A INPUT -p tcp --dport 1:65535 --source 10.0.0.0/8 -j ACCEPT -m comment --comment 'private_network_10.0.0.0/8'
- iptables -A INPUT -p udp --dport 1:65535 --source 10.0.0.0/8 -j ACCEPT -m comment --comment 'private_network_10.0.0.0/8'
- iptables -A INPUT -p icmp -j ACCEPT -m comment --comment 'private_network_10.0.0.0/8'
- iptables -A INPUT -p tcp --dport 22 -j ACCEPT -m comment --comment 'default'
- iptables -A INPUT -p tcp --dport 80 -j ACCEPT -m comment --comment 'web'
- iptables -A INPUT -p tcp --dport 443 -j ACCEPT -m comment --comment 'web'
- iptables -A INPUT -j DROP -m comment --comment 'Disable all other connections.'
- iptables-save > /etc/iptables.rules
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement