How to Change Slave Port In Solus VM Master Server With CentOS/RedHat
It’s not directly possible to change a slaves listening port however you can modify the slaves web server port and a simple iptables rule on the master.
You want the slave to use port 5000 instead of the standard port 6767 then follow some below steps:
On the slave you need to:
Step1. Edit /etc/lighttpd/lighttpd.conf
Step2. Change
server.port =
6767
to
server.port =
5000
Step3. Restart lighttpd:
service lighttpd restart
Step4. Add an iptables rule to your master:
iptables -t nat -A OUTPUT -p tcp -d SLAVE_IP --dport
6767
-j DNAT --to-destination SLAVE_IP:
5000
Step5. Save the iptables rule enter below command:
service iptables save
Step6. The slave will be listening on port 5000 and any traffic at the slave on port 6767 will be directed to port 5000.