closing all and opening specific ports
can anyone give me the commands to close all the ports and open specific ports on the computer? using iptables
|
What time is it?
Time to read the IPTABLES HOWTO. :study: |
Do you have an iptables scripts? if yes, just put your rules for port you want to open first
(example: $IPTABLES -A INPUT -s 0/0 --dport http -j ACCEPT) then at the end of your script add a command like : ( $IPTABLES -A INPUT -s/s -j DROP ) iptables uses the first applicable rules it can find, so if there is no rules about "another port" than this one will be use as default. |
All times are GMT -5. The time now is 02:37 PM. |