tvlad Posted May 21, 2003 Report Share Posted May 21, 2003 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 ??? Quote Link to comment Share on other sites More sharing options...
aru Posted May 21, 2003 Report Share Posted May 21, 2003 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 :? Quote Link to comment Share on other sites More sharing options...
tvlad Posted May 22, 2003 Author Report Share Posted May 22, 2003 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.