Date: Mon, 2 Jun 2003 10:46:25 +0200 (CEST) From: Alexander <amour@amour.ath.cx> To: Matthew Seaman <m.seaman@infracaninophile.co.uk> Cc: freebsd-questions@freebsd.org Subject: Re: Changes to hosts.allow do no affect to inetd daemons some times Message-ID: <20030602104323.M24130-100000@amour.ath.cx> In-Reply-To: <20030602072120.GB23430@happy-idiot-talk.infracaninophile.co.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
So what you say is that if I had opened identd socket for example then updating /etc/hosts.allow and changing rules for ftpd won't take affect on ftpd after new connection ? (assuming that noone is using my ftpd at all) Thanks On Mon, 2 Jun 2003, Matthew Seaman wrote: > On Mon, Jun 02, 2003 at 05:26:15AM +0200, Alexander wrote: > > Hello ! > > > > Sometimes when I change my /etc/hosts.allow and kill and start again > > inetd, there is no difference. It's like I haven't edited > > /etc/hosts.allow. If I continue making changes and stop/start inetd there > > are no affections to the inetd daemons, they allow or deny as > > /etc/hosts.allow isn't modified since inetd was first started after the > > system bootstrapped. > > So what I do now is edit /etc/hosts.allow and then reboot. (Pretty ugly) > > But I noticed that this happens only to the /etc/inetd.conf daemons. > > Stand alone daemons like sshd haven't got such problem the changes occur > > immediately. > > You don't need to restart inetd(8) when you edit /etc/hosts.allow. > TCP wrappers will immediately pick up any changes to that file and > apply them to all subsequent processes connecting to a wrapped > service. > > You are probably seeing the effect of persistent connections: either > connections that are still ongoing or processes spawned by inetd > marked as 'wait', which take over the socket and can accept new > connections if they happen to be running already. Since the TCP > wrappers function is provided by inetd, it can only be applied at the > point that incoming network traffic causes inetd to start up the > wrapped process. Generally processes managed by inetd are fairly > short lived but there are occasional exceptions: nmbd from the samba > suite always seems to start up one time and then run continuously for > ever after. > > Note that long running services with the TCP wrappers functionality > compiled in to them (sendmail, sshd etc) will pick up changes to > hosts.allow instantaneously. Of course, samba software is itself > generally linked against TCP wrappers in exactly this manner. > > Cheers, > > Matthew > > -- > Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks > Savill Way > PGP: http://www.infracaninophile.co.uk/pgpkey Marlow > Tel: +44 1628 476614 Bucks., SL7 1TH UK >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030602104323.M24130-100000>