{"id":1,"date":"2010-03-14T15:30:01","date_gmt":"2010-03-14T08:30:01","guid":{"rendered":"http:\/\/www.jaringankita.com\/blog\/?p=1"},"modified":"2011-04-06T23:25:51","modified_gmt":"2011-04-06T16:25:51","slug":"redhat-enterprise-linux-how-to-secure-your-redhat-enterprise-linux-5-by-user-or-host","status":"publish","type":"post","link":"https:\/\/www.jaringankita.com\/blog\/redhat-enterprise-linux-how-to-secure-your-redhat-enterprise-linux-5-by-user-or-host","title":{"rendered":"[RedHat Enterprise Linux] How to secure your Redhat Enterprise Linux 5 by User or Host"},"content":{"rendered":"<p style=\"text-align: justify;\"><a href=\"https:\/\/www.jaringankita.com\/blog\/wp-content\/uploads\/2010\/03\/TCP-Wrapper-Firewall2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-19\" title=\"TCP-Wrapper-Firewall\" src=\"https:\/\/www.jaringankita.com\/blog\/wp-content\/uploads\/2010\/03\/TCP-Wrapper-Firewall2.jpg\" alt=\"\" width=\"152\" height=\"171\" \/><\/a> Besides using a firewall, and SELinux, there are many ways to make  our RHEL servers secure from crackers that are trying to break into our RHEL system,  one of which is to use <strong><em>tcp_wrapper.<\/em><\/strong> This feature is activated automatically. One thing to take noted that inside this &#8221; tcp_wrapper&#8221; there is a file called <strong>hosts.allow<\/strong> and <strong>hosts.deny<\/strong>. <strong><em>Tcp_ wrappe<\/em><\/strong><em><strong>r<\/strong><\/em> uses sequential system, which is followed from top to bottom.   Here are the\u00a0 workings \/ path on <strong><em>tcp_wrapper:<br \/>\n<strong><\/strong><br \/>\n<strong><\/strong><br \/>\n<strong><\/strong><br \/>\n<strong><\/strong><br \/>\n<strong><\/strong><br \/>\n<strong><\/strong><br \/>\n<\/em><\/strong><!--more--> <strong><em>1.<\/em><\/strong> The system will first look into <strong><em>\/ etc \/ hosts.allow.<\/em><\/strong> If <strong><em>tcp_wrappers<\/em><\/strong> find the file, then the contents of the file will be given access and the system will not be looking into another directory.<\/p>\n<p><strong><em>2.<\/em><\/strong> Then, the system will search the directory <strong><em>\/ etc \/ hosts.deny.<\/em><\/strong> If it matches, then the search will be stopped and will run the contents of the directory.<\/p>\n<p><strong><em>3.<\/em><\/strong> Default. If not found all directory above then it will be allowed all.<\/p>\n<p><strong>An example command is:<\/strong><\/p>\n<p><em>#hosts.allow<\/em><\/p>\n<p><em>ALL : .example.com<\/em><\/p>\n<pre><em>telnetd : 192.168.0.0\/255.255.255.0 EXCEPT 192.168.0.79\r\nsshd, in.tftpd : 192.168.1.10<\/em><\/pre>\n<p>The first line is a comment, the next line is to define the host example.com that can access to all services.   The next line is to show that the telnet service can only be accessed  from any host from the 192.168.0.0\/24 segment except the IP address  192.168.0.79.<\/p>\n<p><strong>Below are examples of commands to hosts.deny:<\/strong><\/p>\n<p><em>#hosts.deny<\/em><\/p>\n<pre><em>ALL EXCEPT in.tftpd : .example.org\r\ntelnetd : ALL EXCEPT 192.168.1.10\r\nALL:ALL\r\n\r\n<\/em><\/pre>\n<p>The first line is to deny all tftp services from all hosts except for example.com.  The next line is to deny all traffic to the telnet service from all hosts except from ip address 192.168.1.10.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Besides using a firewall, and SELinux, there are many ways to make our RHEL servers secure from crackers that are trying to break into our RHEL system, one of which is to use tcp_wrapper. This feature is activated automatically. One thing to take noted that inside this &#8221; tcp_wrapper&#8221; there is a file called hosts.allow [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[28,14,4,167,123],"class_list":["post-1","post","type-post","status-publish","format-standard","hentry","category-other","tag-firewall","tag-ip-address","tag-redhat","tag-rhel","tag-user"],"_links":{"self":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts\/1","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/comments?post=1"}],"version-history":[{"count":18,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts\/1\/revisions"}],"predecessor-version":[{"id":566,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/posts\/1\/revisions\/566"}],"wp:attachment":[{"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/media?parent=1"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/categories?post=1"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jaringankita.com\/blog\/wp-json\/wp\/v2\/tags?post=1"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}