{"id":535,"date":"2015-01-29T04:14:29","date_gmt":"2015-01-28T22:44:29","guid":{"rendered":"https:\/\/serverbasket.com\/help\/?p=535"},"modified":"2022-02-04T12:55:30","modified_gmt":"2022-02-04T07:25:30","slug":"change-slave-server-port-solus-vm-master-server-centosredhat","status":"publish","type":"post","link":"https:\/\/www.serverbasket.com\/help\/change-slave-server-port-solus-vm-master-server-centosredhat\/","title":{"rendered":"How to Change Slave Port In Solus VM Master Server With CentOS\/RedHat"},"content":{"rendered":"<div id=\"content\" class=\"page view\">\n<div id=\"main-content\" class=\"wiki-content\">\n<p>It&#8217;s not directly possible to change a slaves listening port however you can \u00a0modify the slaves web server port and a simple iptables rule on the master.<\/p>\n<p>You want the slave to use port 5000 instead of the standard port 6767 then follow some below steps:<\/p>\n<p>On the slave you need to:<\/p>\n<p>Step1.\u00a0Edit \/etc\/lighttpd\/lighttpd.conf<\/p>\n<p>Step2. Change<\/p>\n<p><code class=\"java plain\">server.port\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = <\/code><code class=\"java value\">6767<\/code><\/p>\n<p>to<\/p>\n<p><code class=\"java plain\">server.port\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 = <\/code><code class=\"java value\">5000<\/code><\/p>\n<p>Step3. Restart lighttpd:<\/p>\n<p><code class=\"java plain\">service lighttpd restart<\/code><\/p>\n<p>Step4. Add an iptables rule to your master:<\/p>\n<div class=\"container\" title=\"Hint: double-click to select code\">\n<div class=\"line number1 index0 alt2\"><code class=\"java plain\">iptables -t nat -A OUTPUT -p tcp -d SLAVE_IP --dport <\/code><code class=\"java value\">6767<\/code> <code class=\"java plain\">-j DNAT --to-destination SLAVE_IP:<\/code><code class=\"java value\">5000<\/code><\/div>\n<\/div>\n<div class=\"aui-message warning shadowed information-macro\">\n<p><span class=\"aui-icon icon-warning\">Note: <\/span>Replace the &#8220;SLAVE_IP&#8221; with the slaves actual ip address<\/p>\n<\/div>\n<p>Step5. Save the iptables rule enter below command:<\/p>\n<p><code class=\"java plain\">service iptables save<\/code><\/p>\n<p>Step6. The slave will be listening on port 5000 and any traffic at the slave on port 6767 will be directed to port 5000.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s not directly possible to change a slaves listening port however you can \u00a0modify 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.\u00a0Edit \/etc\/lighttpd\/lighttpd.conf Step2. [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":1138,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,41,58,7],"tags":[83,84,82],"offerexpiration":[],"class_list":["post-535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-linux","category-solus-vm","category-whm-management","tag-change-port-of-slave-server","tag-linux-slave-server-port-no","tag-solus-vm-slave-server-port"],"_links":{"self":[{"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/posts\/535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/comments?post=535"}],"version-history":[{"count":3,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/posts\/535\/revisions"}],"predecessor-version":[{"id":1139,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/posts\/535\/revisions\/1139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/media\/1138"}],"wp:attachment":[{"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/media?parent=535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/categories?post=535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/tags?post=535"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/www.serverbasket.com\/help\/wp-json\/wp\/v2\/offerexpiration?post=535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}