LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   closing all and opening specific ports (https://www.linuxquestions.org/questions/linux-general-1/closing-all-and-opening-specific-ports-44511/)

nakkaya 02-07-2003 06:31 PM

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

nxny 02-07-2003 07:36 PM

What time is it?

Time to read the IPTABLES HOWTO. :study:

Half_Elf 02-08-2003 11:03 AM

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.