Operating System - HP-UX
1836333 Members
3834 Online
110100 Solutions
New Discussion

how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

 
常有慈悲心
Regular Advisor

how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

thanks
5 REPLIES 5
常有慈悲心
Regular Advisor

Re: how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

i mean only allow 128.1.0.2 to access my host's port 1521.
is /etc/inetd.conf can work this?
Patrick Wallek
Honored Contributor

Re: how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

Is the service for port 1521 run by inetd? Is there an entry for it in /etc/services and /etc/ientd.conf? If so, then you can use /var/adm/inetd.sec to restric access.

You can do this by using an 'allow' line in inetd.sec.

I believe the syntax is:

servicename allow 128.1.0.2

That would only allow the ip address 128.1.0.2 to access the service named servicename.
常有慈悲心
Regular Advisor

Re: how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

how can i restrict 128.1.0.2 can't access other ports?
Biswajit Tripathy
Honored Contributor

Re: how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

One option is to use IPFilter.

Configure the following rule:

$ /sbin/ipf -f -
block in quick proto tcp from 128.1.0.2 to any port = 1521

- Biswajit
:-)
kenny chia
Regular Advisor

Re: how can i restrict some ip like 128.1.0.2 to access my hosts' port 1521?

Hi
Are you trying to restrict access to an Oracle Database listener at port 1521? Instead of filtering at OS level, you could try modifying the file $ORACLE_HOME/NETWORK/ADMIN/PROTOCOL.ORA instead

example...
tcp.validnode_checking = YES
tcp.invited_nodes = (128.1.0.2)
All Your Bases Are Belong To Us!