<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Simple rules for ipfilter in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844279#M545633</link>
    <description>Yes. You are right. Ipfilter does not seem to work on the loopback interface or on local connections made to the lan&lt;X&gt; interface.&lt;BR /&gt;&lt;BR /&gt;For example consider the following ruleset:&lt;BR /&gt;&lt;BR /&gt;# ipfstat -io&lt;BR /&gt;block out log quick proto tcp from any to any port = 23&lt;BR /&gt;block in log quick proto tcp from any to any port = 23&lt;BR /&gt;&lt;BR /&gt;Telnet to another host and telnet from another host is blocked. However telnet to the same host like:&lt;BR /&gt;&lt;BR /&gt;telnet 10.16.2.107&lt;BR /&gt;and&lt;BR /&gt;telnet  127.0.0.1&lt;BR /&gt;&lt;BR /&gt;is accepted!&lt;BR /&gt;&lt;BR /&gt;# netstat -na | grep 23 | grep ESTA&lt;BR /&gt;tcp        0      0  10.16.2.107.64858      10.16.2.107.23          ESTABLISHED&lt;BR /&gt;tcp        0      0  127.0.0.1.64868        127.0.0.1.23            ESTABLISHED&lt;BR /&gt;tcp        0      0  10.16.2.107.23         10.16.2.107.64858       ESTABLISHED&lt;BR /&gt;tcp        0      0  127.0.0.1.23           127.0.0.1.64868         ESTABLISHED&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Why I need to block local connections?&lt;BR /&gt;&lt;BR /&gt;Assume there is a service on port 1234 which should only be accessed from a specific host (=IP). However the host running the service for 1234 is a host that allows terminal logins (telnet, ssh etc.). A logged-in user can run a program that will map local port 1234 to another port (5678) and access that&lt;BR /&gt;port from outside. The user does not have to run a special program; using the ssh "port forwarding" feature he/she can do this very easily!&lt;/X&gt;</description>
    <pubDate>Fri, 25 Aug 2006 05:43:56 GMT</pubDate>
    <dc:creator>Fedon Kadifeli</dc:creator>
    <dc:date>2006-08-25T05:43:56Z</dc:date>
    <item>
      <title>Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844273#M545627</link>
      <description>I recently installed ipfilter to an HP-UX 11.00 box. The latest version is "A.03.05.12 HP IPFilter 3.5alpha5"; what does the string "alpha5" mean? Is this an alpha version?&lt;BR /&gt;&lt;BR /&gt;I simply want to restrict accesses made on some port (everything else should run as if ipfilter is not present). This TCP port should be accessed from only one host and every (successful or not) connection attempt should be logged.&lt;BR /&gt;&lt;BR /&gt;Which is the most efficient ruleset to do this?&lt;BR /&gt;&lt;BR /&gt;I tried the following:&lt;BR /&gt;&lt;BR /&gt;block in log proto tcp from any to any port = 23 flags S/SA&lt;BR /&gt;pass in log proto tcp from 10.16.66.13/32 to any port = 23 flags S/SA&lt;BR /&gt;&lt;BR /&gt;Is this enough? Do you have anyhing to comment on these two lines?&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Aug 2006 03:53:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844273#M545627</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2006-08-16T03:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844274#M545628</link>
      <description>Any comments?</description>
      <pubDate>Thu, 17 Aug 2006 01:04:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844274#M545628</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2006-08-17T01:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844275#M545629</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;Normally alpha5 means pre-beta.&lt;BR /&gt;&lt;BR /&gt;It does not in this case as I used this release for some months and got production quality service out of it.&lt;BR /&gt;&lt;BR /&gt;Your code blocks all telnet except from the network/ip combination in the line listed right below.&lt;BR /&gt;&lt;BR /&gt;I don't know what the flags mean, nor do I think they are needed.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 17 Aug 2006 01:20:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844275#M545629</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2006-08-17T01:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844276#M545630</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;&amp;gt;  block in log proto tcp from any to any port = 23 flags S/SA&lt;BR /&gt;you are going to BLOCK and LOG all INcoming traffic regardless on interface, over TCP protocol FROM ANY machine (even from your local network) TO ANY machine (if this box is router, or any local ip) on PORT 23, which is telnet service&lt;BR /&gt;&amp;gt; pass in log proto tcp from 10.16.66.13/32 to any port = 23 flags S/SA &lt;BR /&gt;here you are going to accept telnet traffic from one machine (10.16.66.13) to telnet port&lt;BR /&gt;flags, this is more complicated, you need to know basics from tcp proto communication.&lt;BR /&gt;S means SYN &lt;BR /&gt;SA is SYN+ACK  &lt;BR /&gt;it has to do with statement filtering&lt;BR /&gt;&lt;BR /&gt;Finally these two ruleset are not definitively enough. You didn't specify what to do with outgoing traffic.&lt;BR /&gt;&lt;BR /&gt;Try to add this lines &lt;BR /&gt;------------------------&lt;BR /&gt;### lo0 - loopback&lt;BR /&gt;##       allow all on loopback&lt;BR /&gt;##&lt;BR /&gt;pass  in  on lo0 all&lt;BR /&gt;pass  out on lo0 all&lt;BR /&gt;#&lt;BR /&gt;pass  in  quick  proto tcp from any to any port = 23   flags S keep state&lt;BR /&gt;block in log proto tcp from any to any  port = 23&lt;BR /&gt;&lt;BR /&gt;pass  out quick on fxp0 proto tcp from any to any keep state&lt;BR /&gt;-----------------------&lt;BR /&gt;please remember, this rules are just about tcp protocol ...... so it is not enough to run ipfilter.&lt;BR /&gt;&lt;BR /&gt;May be it will be G.O.O.D. idea to read this article.&lt;BR /&gt;&lt;A href="http://www.obfuscation.org/ipf/ipf-howto.txt" target="_blank"&gt;http://www.obfuscation.org/ipf/ipf-howto.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Aug 2006 15:30:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844276#M545630</guid>
      <dc:creator>Peter Sedivy</dc:creator>
      <dc:date>2006-08-23T15:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844277#M545631</link>
      <description>Thank you Peter for the article you pointed to.&lt;BR /&gt;&lt;BR /&gt;Reading the article I modified the rules somehow:&lt;BR /&gt;&lt;BR /&gt;block return-rst in  log  proto tcp from any to any port = 23&lt;BR /&gt;pass  in  log proto tcp from 10.16.66.13/32 to any port = 23 flags S keep state keep frags&lt;BR /&gt;&lt;BR /&gt;This is almost the same as my previous ruleset, and it works similarly.&lt;BR /&gt;&lt;BR /&gt;However, I noticed something which I missed before.&lt;BR /&gt;&lt;BR /&gt;Although this and my previous ruleset allows telnet connections from 10.16.66.13 only and no telnet from elsewhere, there is an important exception! Doing telnet from withing host (either using the machine's IP address or using "telnet localhost") is allowed!!! I tried to block this by adding other rules like:&lt;BR /&gt;&lt;BR /&gt;block in  log proto tcp/udp from 10.16.16.28/32 to 10.16.16.28/32&lt;BR /&gt;&lt;BR /&gt;(here 10.16.16.28 is the address of the local machine), but I didn't succeed. I started to think that this is a bug in ipfilter!!!&lt;BR /&gt;&lt;BR /&gt;My requirements are very simple:&lt;BR /&gt;&lt;BR /&gt;* Allow telnet from 10.16.66.13 to 10.16.16.28&lt;BR /&gt;* Do NOT allow telnet from any other IP to 10.16.16.28&lt;BR /&gt;* Do NOT even allow telnet from the same host (10.16.16.28) to 10.16.16.28 (or 127.0.0.1)&lt;BR /&gt;* Everything else is allowed.&lt;BR /&gt;&lt;BR /&gt;Is this so difficult to do?&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Aug 2006 09:32:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844277#M545631</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2006-08-24T09:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844278#M545632</link>
      <description>Hello &lt;BR /&gt;&lt;BR /&gt;hmmm, I think it will be f****g difficult, because: &lt;BR /&gt;any connection to your own IP or loopback address is done by kernel loopback and not via interface. so, IPFilter has nothing to do with this.&lt;BR /&gt;&lt;BR /&gt;BTW, i don't understand why do you want to block your own connection...&lt;BR /&gt;&lt;BR /&gt;Sincerely&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Aug 2006 10:39:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844278#M545632</guid>
      <dc:creator>Peter Sedivy</dc:creator>
      <dc:date>2006-08-24T10:39:49Z</dc:date>
    </item>
    <item>
      <title>Re: Simple rules for ipfilter</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844279#M545633</link>
      <description>Yes. You are right. Ipfilter does not seem to work on the loopback interface or on local connections made to the lan&lt;X&gt; interface.&lt;BR /&gt;&lt;BR /&gt;For example consider the following ruleset:&lt;BR /&gt;&lt;BR /&gt;# ipfstat -io&lt;BR /&gt;block out log quick proto tcp from any to any port = 23&lt;BR /&gt;block in log quick proto tcp from any to any port = 23&lt;BR /&gt;&lt;BR /&gt;Telnet to another host and telnet from another host is blocked. However telnet to the same host like:&lt;BR /&gt;&lt;BR /&gt;telnet 10.16.2.107&lt;BR /&gt;and&lt;BR /&gt;telnet  127.0.0.1&lt;BR /&gt;&lt;BR /&gt;is accepted!&lt;BR /&gt;&lt;BR /&gt;# netstat -na | grep 23 | grep ESTA&lt;BR /&gt;tcp        0      0  10.16.2.107.64858      10.16.2.107.23          ESTABLISHED&lt;BR /&gt;tcp        0      0  127.0.0.1.64868        127.0.0.1.23            ESTABLISHED&lt;BR /&gt;tcp        0      0  10.16.2.107.23         10.16.2.107.64858       ESTABLISHED&lt;BR /&gt;tcp        0      0  127.0.0.1.23           127.0.0.1.64868         ESTABLISHED&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Why I need to block local connections?&lt;BR /&gt;&lt;BR /&gt;Assume there is a service on port 1234 which should only be accessed from a specific host (=IP). However the host running the service for 1234 is a host that allows terminal logins (telnet, ssh etc.). A logged-in user can run a program that will map local port 1234 to another port (5678) and access that&lt;BR /&gt;port from outside. The user does not have to run a special program; using the ssh "port forwarding" feature he/she can do this very easily!&lt;/X&gt;</description>
      <pubDate>Fri, 25 Aug 2006 05:43:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-rules-for-ipfilter/m-p/3844279#M545633</guid>
      <dc:creator>Fedon Kadifeli</dc:creator>
      <dc:date>2006-08-25T05:43:56Z</dc:date>
    </item>
  </channel>
</rss>

