LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   open ports with iptables? (https://www.linuxquestions.org/questions/linux-networking-3/open-ports-with-iptables-269956/)

vijaysh 12-24-2004 11:50 AM

open ports with iptables?
 
hello
i want to open the port 10000 by using iptables.please help me to provide the iptables rule
thank u

skunkburner 12-24-2004 03:24 PM

As you want to open port 10000 I assume you already have webmin.

Connect to 127.0.0.1:10000 and login as your webmin user, go to Network, then linux firewall.

you can add a rule that accepts connections when the destination port is 10000 ( you will also have to specify TCP as the network protocol) - Thats the same same as opening port 10000 through iptables.

this213 12-27-2004 06:54 AM

Code:

/sbin/iptables -A INPUT -i eth0 -m state --state NEW,ESTABLISHED,RELATED -p tcp -s 0.0.0.0/0 -d 12.34.56.78 --dport 10000 -j ACCEPT
replace eth0 with your external interface device (which is probably eth0)
replace 12.34.56.78 with your external IP
replace 0.0.0.0/0 with allowable IP network ( 0.0.0.0/0 means everyone )


All times are GMT -5. The time now is 08:33 PM.