List current rules - sudo iptables -L, Clear current rules - sudo iptables -F, Save iptables changes (Ubuntu) - sudo /sbin/iptables-save, Drop all incoming traffic - sudo iptables -A INPUT -j DROP, Block connections from 192.168.0.254 - sudo iptables -A INPUT -s 192.168.0.254 -j DROP, Block SMTP mail on port 25 - sudo iptables -A OUTPUT -p tcp --dport 25 -j REJECT, Allow SMTP mail on port 25 - sudo iptables -A INPUT -p tcp --dport 25 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -p tcp --sport 25 -m conntrack --ctstate ESTABLISHED -j ACCEPT, Allow HTTP traffic on port 80 - sudo iptables -A INPUT -p tcp --dport 80 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT sudo iptables -A OUTPUT -p tcp --sport 80 -m conntrack --ctstate ESTABLISHED -j ACCEPT , Allow HTTP traffic on port - sudo iptables -A INPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT, Allow HTTPS traffic on port 443 - sudo iptables -A OUTPUT -p tcp -m multiport --dports 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT,

Linux Host 4.4 Vocabulary

排行榜

視覺風格

選項

切換範本

恢復自動保存: ?