iptables -I INPUT -s 0.0.0.0/0 -p tcp --dport 5901 -j ACCEPT I'm going strictly off memoy here so you may need to man iptables. :) hadi motamedi <motamedi24 at gmail.com> wrote:>Dear All >To open a port , I know that I need to go to "System -> Administration -> >Security Level and Firewall" -> Other ports and then I can open port-5901 as >tcp protocol . Can you please do me favor and let me know how it can be done >from the command line (if my CentOS is text-mode installed) ? (perhaps via >iptables?) >Let me thank you in advance >_______________________________________________ >CentOS mailing list >CentOS at centos.org >http://lists.centos.org/mailman/listinfo/centos
On Saturday 31 October 2009 07:48:05 hadi motamedi wrote:> Dear All > To open a port , I know that I need to go to "System -> Administration -> > Security Level and Firewall" -> Other ports and then I can open port-5901 > as tcp protocol . Can you please do me favor and let me know how it can be > done from the command line (if my CentOS is text-mode installed) ? (perhaps > via iptables?) > Let me thank you in advanceEdit /etc/sysconfig/iptables Restart iptables with service iptables restart Tony -- Dept. of Comp. Sci. University of Limerick.
hadi motamedi wrote:> Dear All > To open a port , I know that I need to go to "System -> Administration > -> Security Level and Firewall" -> Other ports and then I can open > port-5901 as tcp protocol . Can you please do me favor and let me know > how it can be done from the command line (if my CentOS is text-mode > installed) ? (perhaps via iptables?)older versions of RHEL had a lokkit text menu based util for setting basic firewall ports. I dunno but it may still be available in current versions. all it actually does is edit that sysconfig/iptables file and restart the iptables service that tony mentions, same as the GUI program does. also, you could make a backup of that file on a GUI system, add a port, then diff the backup and the current iptables file to see exactly what the GUI does
Am Samstag, den 31.10.2009, 08:48 +0100 schrieb hadi motamedi:> Dear All > To open a port , I know that I need to go to "System -> Administration > -> Security Level and Firewall" -> Other ports and then I can open > port-5901 as tcp protocol . Can you please do me favor and let me know > how it can be done from the command line (if my CentOS is text-mode > installed) ? (perhaps via iptables?) > Let me thank you in advance >system-config-securitylevel-tui -q -p $port:$proto eg for HTTP system-config-securitylevel-tui -q -p 80:tcp financial.com AG Munich head office/Hauptsitz M?nchen: Maria-Probst-Str. 19 | 80939 M?nchen | Germany Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany Management board/Vorstand: Dr. Steffen Boehnert | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender) Register court/Handelsregister: Munich ? HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553