Jump to content

tcp wrappers


tvlad
 Share

Recommended Posts

This is the general syntax :

 

<daemon_list>: <client_list>[: spawn <shell_command> ]

 

Now, how can i find out the "<daemon list>"

And why does ftpd has to be specified as in.ftpd, is this the case with sshd ???

Link to comment
Share on other sites

I'm not sure what you want to do, but let's see if this helps. And sorry if I'm missunderstanding you (my english is awful)

 

Do you just want to strip out the <daemon list> part?

 

Or do you want to search for a discrete <daemon> pattern?

 

Or something else?

 

Btw, what tool/language do you want to use?

 

Supposing that you just want to extract the <daemon list> part, here are a couple of examples

 

with AWK:

~$ awk -F: '{print $1}' list

 

with sed:

~$ sed -n 's/^(.[^:]*):.*/1/p' list

 

Sorry if I misunderstand you :( But would you please provide a few examples of what are you trying to do and what do you expect to get (ie source --> final result)

 

...or I'm just completly lost with this one! Is too late here and I'm too tired to think clearly :?

Link to comment
Share on other sites

That is the syntax of tcpwrappers.For example, if i add this to hosts.allow :

 

ALL EXCEPT in.ftpd: 123.123.123.1

 

would allow this ip to use all services except ftp.What i want to know is

why does fptd start with "in." in the syntax and if this is also the case with sshd.If i wanted to allow all but ssh, should i do like this :

 

ALL EXCEPT in.sshd: 123.123.123.1

 

OR

 

ALL EXCEPT sshd: 123.123.123.1

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...