Bu Komutlar İşinize Yararmı?
Kapatmanız gereken bir port olduğunda :
service iptables stop
iptables -A INPUT -p tcp --dport portnumaranız -j REJECT
iptables -A INPUT -p udp --dport portnumaranız -j REJECT
service iptables save
service iptables start
Açmanız gereken bir port olduğunda :
service iptables stop
iptables -A INPUT -p tcp --dport portnumaranız -j ACCEPT
iptables -A INPUT -p udp --dport portnumaranız -j ACCEPT
service iptables save
service iptables start
Açık ve dinlenen portlarınızı aşağıdaki komut ile öğrenebilirsiniz:
netstat -lntu
Port ve servisleri listeler:
cat /etc/services