iptables

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, you can send me to the hell but, I have a Red Hat 4 box and I
need to open the port 8080, I have never used iptables, only openSUSE
YaST firewall module, so how can I open and close ports on it?


VampirD
No in elenath hîlar nan hâd gîn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuFbp4ACgkQJQ+0ABWtaVkOmQCgiPHZa4MLY66kPDUq21sGJUSq
xN8AoJ3UtNzrjr0WfHY+RsyrKano9rvN
=zP9K
-----END PGP SIGNATURE-----

iptables -A open -i ethn -p tcp --dport 8080 -j ACCEPT

As for closing that would be a reject/drop rule any way this tut though for still another distro, helped me when I started playing with iptables, certainly initially over the multitude of manuals you can come across.

Simple stateful firewall HOWTO - ArchWiki

Generally you allow then drop/reject the rest so it isn’t a case of closing but opening. Also remember it is a chain so it will match the first rule it encounters, order is important.

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ok, thank you :slight_smile:


VampirD
No in elenath hîlar nan hâd gîn
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkuFepIACgkQJQ+0ABWtaVmM+gCgofVX2+3xdEC4bS+VYK+KVi1I
0+YAn2pPJtKKcaPDEZInMh9ic2y5xz0E
=GZBK
-----END PGP SIGNATURE-----

You should look at the existing rules with iptables -L -n. From memory the name of the chain where the rules live is RH-Input-1 or something like that.