Can't reach server after changing port number

I will keep this short and precise. I have a new cloud server I am setting up. I have re-imaged it multiple times trying to get the perfect config setup. I have installed Webmin (only) on a "plesk" pre-image setup. I could change the port number to say 10201, no problems. But I do not want plesk so I am going with a centos 5.6 install and then use webmin/virtualmin.

I have done this several times (below) and everytime I change the port number to something different (i.e. 10401, then I can no longer reach mydomain:10401. I have even tried to edit the miniserv.conf file and change the port back to 10000 but that does not work. I will always get:

Firefox can't establish a connection to the server at 74.208.231.138:10000. (or whatever port)

Can you tell me what might be happening to cause this? My steps to setup the server are shown below.

The steps I am doing to set the server up are: 1. Re-image 64 bit centOS minimal 2. wget -q -O - http://www.atomicorp.com/installers/atomic |sh 3. yum update 4. yum install php 5. yum install php-ioncube-loader 6. Install APC: (can't install php-devel – conflicts. I think it is already installed with ioncube) http://stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-... 7. Set correct Network Host name: vi /etc/sysconfig/network 8. Install Webmin: http://www.webmin.com/vinstall.html wget http://software.virtualmin.com/gpl/scripts/install.sh 9. chmod +x install.sh ./install.sh 10. Install denyhost (prevent brute force attack) http://www.how2centos.com/installing-denyhosts-on-centos-5-6/

(the one thing I have never tried is rebooting the machine after I complete these steps (but before I ever access mydomain.com:10000) not sure that if would make a difference.

Status: 
Closed (fixed)

Comments

I found this same issue posted here: http://www.linuxquestions.org/questions/linux-software-2/just-installed-...

not sure if I am having the same problem. Since this is literally a fresh install from OS to webmin/virtualmin I would not think that there are issues with the iptables, etc. However, I am re-imaging the server now and will check that. I am going to only run yum update to update centos 5.6 and then install webmin/virtualmin. I will see how that goes.

Problem solved. This has to be a bug because it happened again. I had to manually add the new rule.

vi /etc/sysconfig/iptables

then inserted this at the top of the other -A rules: (with 99999 being the actual port I assigned in Webmin).

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 99999 -j ACCEPT

then restart the iptables by: service iptables restart

I am not a programmer but webmin should be updating the iptables with this port number when the port is changed so you will always get locked out :0

Tim

Good idea .. I will have Webmin open the new ports in the next release.

Automatically closed -- issue fixed for 2 weeks with no activity.