VestaCP – Change listening port admin interface (Part 2)

This is a follow up post on my previous article about changing the admin port for VestaCP (found here)

For a new project I decided to install VestaCP on a server I have from LittleHappyCloud.net. LHC is a KVM server that doesn’t have a dedicated IPv4, you get 20 forwarded ports on the IPv4 and port 80 is forwarded based on added domain names in the VPS Control Panel.

 

This means that the default VestaCP admin port needs to be changed if you should be able to connect to the admin interface over IPv4. In my previous article I showed you how you changed the settings via the admin interface but that is impossible to reach unless you use IPv6.

 

To accomplish this from the shell we need to execute the following commands as root;

Update the firewall rules

If you have iptables installed we first have to find the firewall rule that opens the VestaCP admin port and update this to the new port that we will use.

Will return the list of active firewall rules, it may look something like this

From the above result we see that the second row is the VestaCP Admin port (8083) and this is the rule that we should update.

Using the above information, the LHC assigned port 11601 and the VestaCP command v-change-firewall-rule and parameters will look like this:

There, the port is now accessible over IPv4. Now we need to change the listening port of VestaCP.

I have copied the last part of Part 1 and updated it according to my example above.

Changing the admin port

Make a backup of the config file and then open the original configuration file with your favourite editor (mine is nano)

about a page down in the configuration file you should find this section

change the port number on the row that starts with listen and it should now look like this:

Exit and save the configuration file.

restart the service by running this command:

and you should now be able to access your admin web interface on the new port https.//<your_server_ip>:11601

 

Enjoy!

1 comment for “VestaCP – Change listening port admin interface (Part 2)

Leave a Reply

Your email address will not be published. Required fields are marked *