{"id":5123,"date":"2015-08-13T14:28:38","date_gmt":"2015-08-13T06:28:38","guid":{"rendered":"http:\/\/rmohan.com\/?p=5123"},"modified":"2015-08-13T14:28:38","modified_gmt":"2015-08-13T06:28:38","slug":"configure-ipfilter-on-solaris10-as-a-host-based-firewall","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=5123","title":{"rendered":"Configure ipfilter on Solaris10 as a host based firewall"},"content":{"rendered":"<p>1- Start by check ipfilter status if it&#8217;s running you can go ahead and configure rules<\/p>\n<blockquote><p>-bash-3.00$ svcs -a|grep -i ipfil<br \/>\nonline 10:29:37 svc:\/network\/ipfilter:default<\/p><\/blockquote>\n<p>if it&#8217;s disabled enable it<\/p>\n<blockquote><p>#svcadm enable ipfilter<\/p><\/blockquote>\n<p>2- Display rules<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<blockquote><p>#bash-3.00ipfstat -io<br \/>\nblock out all<br \/>\npass out quick on lo0 all<br \/>\npass out quick on eri0 proto tcp\/udp from eri0\/32 to any port = domain with keep state<br \/>\npass out quick on eri0 proto tcp from eri0\/32 to any port = http keep state<br \/>\npass out quick on eri0 proto icmp from 192.168.1.0\/24 to 192.168.1.0\/24<br \/>\nblock in all<br \/>\npass in quick on lo0 all<br \/>\npass in quick on eri0 proto icmp from 192.168.1.0\/24 to 192.168.1.0\/24<br \/>\npass in quick on eri0 proto tcp from any to eri0\/32 port = http keep state<br \/>\npass in quick on eri0 proto tcp\/udp from any to eri0\/32 port = domain with keep state<\/p><\/blockquote>\n<p>3- Edit rules<span class=\"Apple-converted-space\">\u00a0<\/span><br \/>\nunder<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<blockquote><p>\/etc\/ipf\/ipf.conf<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>#vi \/etc\/ipf\/ipf.conf<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<blockquote><p>#<br \/>\n# ipf.conf<br \/>\n#<br \/>\n# IP Filter rules to be loaded during startup<br \/>\n#<br \/>\n# See ipf(4) manpage for more information on<br \/>\n# IP Filter rules syntax.<br \/>\n####<br \/>\nset intercept_loopback true;<br \/>\nblock in all<br \/>\nblock out all<br \/>\n### inbound traffic ###<br \/>\npass in quick on lo0 all<br \/>\npass in quick on eri0 proto icmp from 192.168.1.0\/24 to 192.168.1.0\/24<br \/>\npass in quick on eri0 proto tcp from any to eri0\/32 port = http keep state<br \/>\npass in quick on eri0 proto tcp\/udp from any to eri0\/32 port = domain keep state<\/p>\n<p>pass out quick on lo0 all<br \/>\npass out quick on eri0 proto tcp\/udp from eri0\/32 to any port = 53 keep state<br \/>\npass out quick on eri0 proto tcp from eri0\/32 to any port = http keep state<br \/>\npass out quick on eri0 proto icmp from 192.168.1.0\/24 to 192.168.1.0\/24<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>1- Start by check ipfilter status if it&#8217;s running you can go ahead and configure rules<\/p>\n<p>-bash-3.00$ svcs -a|grep -i ipfil online 10:29:37 svc:\/network\/ipfilter:default<\/p>\n<p>if it&#8217;s disabled enable it<\/p>\n<p>#svcadm enable ipfilter<\/p>\n<p>2- Display rules <\/p>\n<p>#bash-3.00ipfstat -io block out all pass out quick on lo0 all pass out quick on eri0 proto tcp\/udp from [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5123"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5123"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5123\/revisions"}],"predecessor-version":[{"id":5124,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/5123\/revisions\/5124"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}