<?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: Block users from a particular IP in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117173#M447151</link>
    <description>Thanks to everyone.&lt;BR /&gt;&lt;BR /&gt;I am going to script it, I think that is the best way. I will be doing something like this,&lt;BR /&gt;&lt;BR /&gt;If $User = &lt;A bunch="" of="" user="" names="" target="_blank"&gt; &amp;amp;&amp;amp; $SourceIP != &lt;IP address=""&gt;&lt;BR /&gt;then&lt;BR /&gt;Kick them out&lt;BR /&gt;fi.&lt;BR /&gt;&lt;BR /&gt;So that the user can come via only one IP address, that satisfy my requirement.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Shahul&lt;/IP&gt;&lt;/A&gt;</description>
    <pubDate>Thu, 10 Jul 2008 13:50:34 GMT</pubDate>
    <dc:creator>Shahul</dc:creator>
    <dc:date>2008-07-10T13:50:34Z</dc:date>
    <item>
      <title>Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117167#M447145</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I have a strange requirement, I would like to block some users coming to Unix server directly from their laptop. The server and their laptop are in same DNS. I have IP filter to block IPs, I can't block all laptop Ips as there are many. Is there any way I can mention that users should only come from a prticular IP and block all the rest? I know we can use staticroute for this, it's again we need to maintain the routes list.&lt;BR /&gt;&lt;BR /&gt;TIA&lt;BR /&gt;Shahul</description>
      <pubDate>Wed, 02 Jul 2008 10:48:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117167#M447145</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2008-07-02T10:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117168#M447146</link>
      <description>Shalom Shahul,&lt;BR /&gt;&lt;BR /&gt;You might be able to do it with tcpwrappers if its coming in with a particular protocol.&lt;BR /&gt;&lt;BR /&gt;You certainly will be able to block the traffic with the ipfilter firewall.&lt;BR /&gt;&lt;BR /&gt;TCP Wrappers is available only from &lt;A href="http://software.hp.com" target="_blank"&gt;http://software.hp.com&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;ipfilter is available from the above website and your Core OS or Application CD/DVD.&lt;BR /&gt;&lt;BR /&gt;Well TCP may be there do, I'm not going to check, but these are the tools.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 02 Jul 2008 11:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117168#M447146</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-07-02T11:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117169#M447147</link>
      <description>So you have an unknown, and changing, number of sources which should be blocked.&lt;BR /&gt;And you have a know host which should be allowed for certain users.&lt;BR /&gt;&lt;BR /&gt;I would suggest a login script which checks the 'who -um' output for those users and make sure an allowed hostname is reported.&lt;BR /&gt;&lt;BR /&gt;Example output:&lt;BR /&gt;&lt;BR /&gt;$ who -um&lt;BR /&gt;hein       pts/tc       Jul  2 11:39   .    29267  pool-71-168-yy-xx.cncdnh.east.verizon.net&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Jul 2008 15:01:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117169#M447147</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-07-02T15:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117170#M447148</link>
      <description>"users" or "IP" addresses ??  This makes a difference.&lt;BR /&gt;&lt;BR /&gt;If "users" then you can only block using some type of scripted shell function. e.g. if $LOGNAME = "BOB" then echo Sorry Bob, goodbye....&lt;BR /&gt;&lt;BR /&gt;If "IP" then any one of the tcpwrapper, inetd.conf or IPSec solutions would work ( pick one ).&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Jul 2008 15:22:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117170#M447148</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-07-02T15:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117171#M447149</link>
      <description>Hi Shahul,&lt;BR /&gt;&lt;BR /&gt;I remember using /var/adm/inetd.sec for making restrictions on specific protocols; If you have not already tried, take a look at the man pages for "inetd.sec".&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 02 Jul 2008 16:06:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117171#M447149</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2008-07-02T16:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117172#M447150</link>
      <description>This is not a strange requirement but it is almost impossible to do at the networking level. The reason is that a "user" has no meaning on the network. A "user" is defined when a connection is made and authentication programs are run (such as login and passwd). So you'll need to block the bad users after they have authenticated themselves, namely, in /etc/profile (and all the profiles for different shells that may be used on your system such as bash, csh, tcsh, etc). &lt;BR /&gt; &lt;BR /&gt;At the top of the primary profile (ksh, POSIX sh, bash use /etc/profile), you lockout all interrupts that can bypass the profile tests. Then determine the IP address and username for this particular login and compare the result to a valid user+IP list. If not found on the list, exit.&lt;BR /&gt; &lt;BR /&gt;To get the user's name and hostname/IPaddr, use:&lt;BR /&gt; &lt;BR /&gt;who -muR | awk '{print $1,$NF}' | read USER HOSTIP&lt;BR /&gt;IPADDR=$(getip $HOSTIP)&lt;BR /&gt;echo "user=$USER, IP=$IPADDR" &lt;BR /&gt;</description>
      <pubDate>Wed, 02 Jul 2008 17:09:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117172#M447150</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2008-07-02T17:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117173#M447151</link>
      <description>Thanks to everyone.&lt;BR /&gt;&lt;BR /&gt;I am going to script it, I think that is the best way. I will be doing something like this,&lt;BR /&gt;&lt;BR /&gt;If $User = &lt;A bunch="" of="" user="" names="" target="_blank"&gt; &amp;amp;&amp;amp; $SourceIP != &lt;IP address=""&gt;&lt;BR /&gt;then&lt;BR /&gt;Kick them out&lt;BR /&gt;fi.&lt;BR /&gt;&lt;BR /&gt;So that the user can come via only one IP address, that satisfy my requirement.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;Shahul&lt;/IP&gt;&lt;/A&gt;</description>
      <pubDate>Thu, 10 Jul 2008 13:50:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117173#M447151</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2008-07-10T13:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Block users from a particular IP</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117174#M447152</link>
      <description>Closed</description>
      <pubDate>Thu, 10 Jul 2008 13:50:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/block-users-from-a-particular-ip/m-p/5117174#M447152</guid>
      <dc:creator>Shahul</dc:creator>
      <dc:date>2008-07-10T13:50:56Z</dc:date>
    </item>
  </channel>
</rss>

