{"id":1739,"date":"2012-01-21T13:23:30","date_gmt":"2012-01-21T05:23:30","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=1739"},"modified":"2023-04-28T09:49:58","modified_gmt":"2023-04-28T09:49:58","slug":"how-to-modify-the-default-webmins-port-number-on-centos-5-7","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-modify-the-default-webmins-port-number-on-centos-5-7\/","title":{"rendered":"How to Modify the Default Webmin&#8217;s Port Number on CentOS 5.7"},"content":{"rendered":"<p>To improve the security on my linux centOS server, it is recommended to change the default port of the service and change it to custom webmin&#8217;s port number. In this post i will show you on how to modify the default port, 10000 to 10101.<\/p>\n<p><strong>Check default port number :<\/strong><\/p>\n<pre class=\"code\">\n[root@CentOS57 ~]# netstat -plunt | grep perl\ntcp        0      0 0.0.0.0:10000               0.0.0.0:*                   LISTEN      4521\/perl   \nudp        0      0 0.0.0.0:10000               0.0.0.0:*                               4521\/perl  \n<\/pre>\n<p><strong>Where is the webmin port number stored?<\/strong><br \/>\nWebmin port number store in \/etc\/webmin\/miniserv.conf<\/p>\n<p><strong>To modify the default port, 10000 to 10101, open the \/etc\/webmin\/miniserv.conf file and modify line 1 and 16.<\/strong><\/p>\n<pre class=\"code\">\n1 port=10101\n..\n..\n16 listen=10101\n..\n<\/pre>\n<p><strong>Sample configuration file :<\/strong><\/p>\n<pre class=\"code\">\n[root@CentOS57 ~]# vi \/etc\/webmin\/miniserv.conf\n<\/pre>\n<pre class=\"code\">\nport=10101\nroot=\/usr\/local\/webmin\nmimetypes=\/usr\/local\/webmin\/mime.types\naddtype_cgi=internal\/cgi\nrealm=Webmin Server\nlogfile=\/var\/webmin\/miniserv.log\nerrorlog=\/var\/webmin\/miniserv.error\npidfile=\/var\/webmin\/miniserv.pid\nlogtime=168\nppath=\nssl=0\nenv_WEBMIN_CONFIG=\/etc\/webmin\nenv_WEBMIN_VAR=\/var\/webmin\natboot=1\nlogout=\/etc\/webmin\/logout-flag\nlisten=10101\ndenyfile=\\.pl$\nlog=1\nblockhost_failures=5\nblockhost_time=60\nsyslog=1\nsession=1\npremodules=WebminCore\nserver=MiniServ\/1.570\nuserfile=\/etc\/webmin\/miniserv.users\nkeyfile=\/etc\/webmin\/miniserv.pem\npasswd_file=\/etc\/shadow\npasswd_uindex=0\npasswd_pindex=1\npasswd_cindex=2\npasswd_mindex=4\npasswd_mode=0\npreroot=blue-theme\npassdelay=1\n<\/pre>\n<p><strong>Restart webmin service using this command:<\/strong><\/p>\n<pre class=\"code\">\n[root@CentOS57 ~]# \/etc\/webmin\/restart\nStopping Webmin server in \/usr\/local\/webmin\nStarting Webmin server in \/usr\/local\/webmin\nPre-loaded WebminCore\n<\/pre>\n<p><strong>Check the modified webmin&#8217;s port number<\/strong><\/p>\n<pre class=\"code\">\n[root@CentOS57 ~]# netstat -plunt | grep perl\ntcp        0      0 0.0.0.0:10101               0.0.0.0:*                   LISTEN      4750\/perl   \nudp        0      0 0.0.0.0:10101               0.0.0.0:*                               4750\/perl\n<\/pre>\n<p><strong>Now you can access the Webmin through url  with new custom port.<\/strong><br \/>\nhttp:\/\/serverip:10101<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To improve the security on my linux centOS server, it is recommended to change the default port of the service and change it to custom webmin&#8217;s port number. In this&#8230;<\/p>\n","protected":false},"author":6,"featured_media":885,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1091],"tags":[1248,1536,1917],"class_list":["post-1739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-webmin","tag-centos-5-7","tag-linux","tag-webmin"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=1739"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1739\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/885"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=1739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=1739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=1739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}