{"id":2878,"date":"2012-07-12T14:47:32","date_gmt":"2012-07-12T14:47:32","guid":{"rendered":"http:\/\/www.theperfectarts.com\/?p=2878"},"modified":"2018-01-06T16:42:48","modified_gmt":"2018-01-06T16:42:48","slug":"defne-service-names-and-port-in-linux-server","status":"publish","type":"post","link":"https:\/\/www.ktchost.com\/blog\/defne-service-names-and-port-in-linux-server\/","title":{"rendered":"Define service names and port in Linux Server"},"content":{"rendered":"<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\nvar _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text\/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https:\/\/ssl' : 'http:\/\/www') + '.google-analytics.com\/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();\n\/\/ ]]><\/script><br \/>\nThe <strong>\/etc\/services<\/strong> file is enables the server and client programs to convert the\u00a0service names in to these numbers \u00a0ports. The list is kept on each host and\u00a0it is always \u00a0stored in the same file <strong>\/etc\/services<\/strong>. As per default configuration \u00a0the <strong>&#8220;root&#8221;<\/strong> user is only allowed\u00a0to make the modification in this <strong>\/etc\/services<\/strong>. \u00a0To improve the server security, we can \u00a0immunize this file to prevent unauthorized deletion or addition of services. If you wan to add any new service on the server with the respective port then refer to the following syntax and add the new service with the respective port but make sure that new port is not used by any other existing service else it will cause the problem to start the service because we can&#8217;t define same port for two different services.<\/p>\n<p><span style=\"color: #800000;\"><strong>new-service-name \u00a0new-service-name-port-no\/tcp # Description<\/strong><br \/>\n<strong>new-service-name\u00a0\u00a0new-service-name-port-no\/udp # Description\u00a0<\/strong><\/span><\/p>\n<p>For example if we want to add the new port for SMTP than add the following lines in the <strong>\/etc\/services<\/strong> file.<\/p>\n<p><span style=\"color: #800000;\"><strong>smtp 26\/tcp mail\u00a0# SMTP<\/strong><br \/>\n<strong> smtp 26\/udp mail\u00a0# SMTP<\/strong><\/span><\/p>\n<p><a href=\"https:\/\/www.ktchost.com\/wordpress-hosting.html\"><img loading=\"lazy\" decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2016\/09\/footer-2.png\" alt=\"\" border=\"0\" width=\"468\" height=\"60\"  \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>The \/etc\/services file is enables the server and client programs to convert the\u00a0service names in to these numbers \u00a0ports. The list is kept on each <a class=\"mh-excerpt-more\" href=\"https:\/\/www.ktchost.com\/blog\/defne-service-names-and-port-in-linux-server\/\" title=\"Define service names and port in Linux Server\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46],"tags":[],"class_list":["post-2878","post","type-post","status-publish","format-standard","hentry","category-cpanel"],"_links":{"self":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts\/2878"}],"collection":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/comments?post=2878"}],"version-history":[{"count":7,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts\/2878\/revisions"}],"predecessor-version":[{"id":6176,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/posts\/2878\/revisions\/6176"}],"wp:attachment":[{"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/media?parent=2878"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/categories?post=2878"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ktchost.com\/blog\/wp-json\/wp\/v2\/tags?post=2878"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}