Operating System - HP-UX
1849370 Members
6132 Online
104044 Solutions
New Discussion

Network Connection to Server

 
Ray Bell
Regular Advisor

Network Connection to Server

I want to secure my server where certain servers can't connect to the server via ftp, telnet, ssh or any other way to connect. I was looking at the /var/adm/inetd.sec but I'm not sure it will work. Also will a shell script that will be reads into /etc/profile work? If so do anyone have one already created. Please help!!!
10 REPLIES 10
James R. Ferguson
Acclaimed Contributor

Re: Network Connection to Server

Hi:

The 'inetd.sec' file should certainly serve your purpose. Have a look at the man pages ('man (4) inetd.sec'). There are some examples and guidelines for dealing with multiple servers. Changes to 'inetd.sec' apply to any subsequent connections.

Regards!

...JRF...
harry d brown jr
Honored Contributor

Re: Network Connection to Server

inetd.sec will work.

login deny 10.* 192.54.*

ftp deny 10.* 192.68.*

...

live free or die
harry
Live Free or Die
Sanjay_6
Honored Contributor
RAC_1
Honored Contributor

Re: Network Connection to Server

inetd.sec works pefectly fine.

Just put as follows
servive_name alllow/deny host,network


Regards,
There is no substitute to HARDWORK
Ray Bell
Regular Advisor

Re: Network Connection to Server

I have place the i.p. address of the system in the /var/adm/inetd.sec but I can still telnet to the server and connect and have no problem.


Whats I added to the file:

login deny "servname"
login deny "servername"
login deny "servername"

Is there a command to restart the file or what.
James R. Ferguson
Acclaimed Contributor

Re: Network Connection to Server

Hi Ray:

The reason for your problem can be found in the man pages: "Multiple allow|deny lines for each service are not supported. If there are multiple allow|deny lines for a particular service, all but the last line are ignored."

You need to do something like:

login deny servername1 servername2 servername3 servername4

Have a look at those pages, again. ;-)

Regards!

...JRF...



Ray Bell
Regular Advisor

Re: Network Connection to Server

Hey I look at the man pages again and what you said I had done earlier and this was the reason I did it the way I did. So I move it back:

login deny servername1 servername2 servername3

So the problem still exist. What files are associated with this inetd.sec that need to be a certain way in order for this to work. The permision on the file is 444.

I'm not doing rlogin command on this server, just a regular telnet command. I know in the inetd.sec you can specify who you want to have access to rlogin to your server.
Ray Bell
Regular Advisor

Re: Network Connection to Server

I have figure out my problem. I need to use telnet instead of login from those server.

telnet deny servername1 servername2 servername3
James R. Ferguson
Acclaimed Contributor

Re: Network Connection to Server

Hi (again) Ray:

Sorry, you did say "telnet" in your post. I was focused on the syntax you offered which referenced "login". My comment was meant to focus you on the fact that multiple lines with the same referenced service must *not* declare the service more than once. Using the backslash to continue lines is appropriate as the man pages show.

The Forum appears to be striping the backslash (continuation) character from replies. I've reported that in Dan's Issues thread.

In any event, glad all's well!

Regards!

...JRF...
Brian Watkins
Frequent Advisor

Re: Network Connection to Server

Between inet.sec and /etc/services, you should be able to lock your system down as tightly as you need it.