Open a port CentOS
7,363
Try something like this:
$ iptables -A INPUT -p tcp --dport 3343 -j ACCEPT
$ iptables -A INPUT -p tcp --dport 8880 -j ACCEPT
Related videos on Youtube
Comments
-
Marco Herrarte almost 2 years
I'm new in CentOS and I'm trying to create a little script in Python, something like:
$ python -m SimpleHTTPServer
If I try to access port 8000 in my web browser, I don't get access, however if I turn off the firewall with:
$ system-config-firewall-tui
I'm able to access the service.
I just need to access port 3343 and 8880 but I don't want to disable the firewall.
-
slm over 10 yearsSo it works with the firewall off, but not when it's on?
-
Marco Herrarte over 10 yearsExactly! I think i need to configure the firewall to access only to this ports, but i dont know how :(
-
-
Alohahaha over 10 yearsif IPTables are not running you may need to run "system-config-securitylevel" first. And if you want them to be permanent save them by running "/sbin/service iptables save"
-
slm over 10 years@PurindaGunasekara - getting ahead of ourselves. If these rules solve the issue then yes, we can make these permanent.