Need to open port 10000 for webmin and 21 for FTP in Centos?

35,259

Solution 1

Based on the iptables output you posted, everything is already open. In fact, your not blocking anything!

Solution 2

when you want to change it manually, here is a good tutorial:

http://www.cyberciti.biz/faq/rhel-fedorta-linux-iptables-firewall-configuration-tutorial/

Otherwise you could use the programs system-config-securitylevel or system-config-firewall.

Solution 3

iptables -I INPUT -p tcp --dport 10000 -s 192.168.1.0/24 -j ACCEPT
iptables -I INPUT -p tcp --dport 21 -s 192.168.1.0/24 -j ACCEPT

And save the changes to iptables :

iptables-save > /etc/sysconfig/iptables

Solution 4

You might want to reconsider opening those ports since Webmin is notoriously full of bugs and ftp sends usernames and passwords in plain text. Better to ssh in and tunnel through that to gain access to Webmin (or just learn to manage the server without Webmin, which in the long-term is a far better option). For ftp, consider replacing it with sftp/scp.

Share:
35,259

Related videos on Youtube

peterh
Author by

peterh

Updated on September 17, 2022

Comments

  • peterh
    peterh over 1 year

    How can I open these two ports in CentOS? I have used Ubuntu before, but I never had to manually open any port.

    When I enter iptables -L, I get output like this:

    Chain INPUT (policy ACCEPT)
    target     prot opt source               destination
    
    Chain FORWARD (policy ACCEPT)
    target     prot opt source               destination
    
    Chain OUTPUT (policy ACCEPT)
    target     prot opt source               destination
    [root@sachinvasudev test]#
    
    • peterh
      peterh almost 9 years
      Don't say it is for webmin, they will close your question because they don't like control panels.
  • user2987902
    user2987902 over 14 years
    I have to agree with David. Have you tried accessing webmin or ftp?
  • peterh
    peterh almost 9 years
    A script is not enough without a textual elaboration.