Unix Technical Forum

inetd.conf security

This is a discussion on inetd.conf security within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> On Tue, 05 Oct 2004 22:28:18 -0700 Frank Cusack <fcusack@fcusack.com> wrote: > One no one has yet mentioned is ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > Sun Solaris Administration

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #31 (permalink)  
Old 01-16-2008, 07:53 AM
Stefaan A Eeckels
 
Posts: n/a
Default Re: inetd.conf security

On Tue, 05 Oct 2004 22:28:18 -0700
Frank Cusack <fcusack@fcusack.com> wrote:

> One no one has yet mentioned is that it doesn't
> honor TTL. This was a "dumb" implementation choice (and dumb of Linux
> to copy) although I understand the value of simple.


Too simple is dumb. Fortunately, it's easily solved by
switching host caching off in nscd.conf and installing dnscache.

--
Stefaan
--
"What is stated clearly conceives easily." -- Inspired sales droid
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #32 (permalink)  
Old 01-16-2008, 07:54 AM
shoe
 
Posts: n/a
Default Re: inetd.conf security

Roy Nielsen wrote:

> In my group we've tried to tighten up security on our Solaris systems...
>
> I was wondering if anyone had any trouble commenting everything (almost)
> out of /etc/inetd.conf...
>
> Could this cause instablility in the system?
>
> the only things uncommented on our systems are:
>
> # smserverd to support removable media devices
> 100155/1 tli rpc/ticotsord wait root
> /usr/lib/smedia/rpc.smserverd
>
> # printer daemon...
> printer stream tcp nowait root /usr/lib/print/in.lpd
> in.lpd
>
> # RWALLD - rwall daemon (allows others to post messages to users)
> walld/1 tli rpc/datagram_v wait root
> /usr/lib/netsvc/rwall/rpc.rwalld rpc.rwalld
>
>
> Thanks,
> -Roy


If you go with the idea that it is easier to "give than take away"
comment everything out use ssh to get to the system and then add in
(uncomment) only what you really need. For instance the following is
the only thing in one of our more secure servers. A back up daemon
(which is not very secure but necessary) (upasd - a home grown password
password sync daemon. That is it.

bpcd stream tcp nowait root /usr/openv/netbackup/bin/bpcd bpcd
vopied stream tcp nowait root /usr/openv/bin/vopied vopied
bpjava-msvc stream tcp nowait root
/usr/openv/netbackup/bin/bpjava-msvc bpjava-msvc -transient
100153/1 dgram rpc/udp wait root /opt/SUNWvts/bin/sunvts
/opt/SUNWvts/bin/sunvts -g
upasd stream tcp nowait root /usr/sbin/upasd upasd

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #33 (permalink)  
Old 01-16-2008, 07:54 AM
Toomas Soome
 
Posts: n/a
Default Re: inetd.conf security

Frank Cusack wrote:

> Agreed on both points, however nscd introduces its own problems w.r.t.
> host resolution. One no one has yet mentioned is that it doesn't
> honor TTL. This was a "dumb" implementation choice (and dumb of Linux
> to copy) although I understand the value of simple. This is such an
> issue at every place I've ever been that nscd for hostname caching is
> always a no-no. If we need hostnames to be cached we run a local
> caching nameserver.


man nscd.conf:

positive-time-to-live cachename value
negative-time-to-live cachename value

ok, this is not related to DNS TTL, but it's still there, you can set
short ttl for hosts/ipnodes and still rely on your named for dns TTL
handling. reading manual is sometimes useful...

toomas
--
Tomorrow will be cancelled due to lack of interest.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #34 (permalink)  
Old 01-16-2008, 07:54 AM
Frank Cusack
 
Posts: n/a
Default Re: inetd.conf security

On Wed, 06 Oct 2004 17:16:20 +0300 Toomas Soome <Toomas.Soome@microlink.ee> wrote:
> Frank Cusack wrote:
>
>> Agreed on both points, however nscd introduces its own problems w.r.t.
>> host resolution. One no one has yet mentioned is that it doesn't
>> honor TTL. This was a "dumb" implementation choice (and dumb of Linux
>> to copy) although I understand the value of simple. This is such an
>> issue at every place I've ever been that nscd for hostname caching is
>> always a no-no. If we need hostnames to be cached we run a local
>> caching nameserver.

>
> man nscd.conf:
>
> positive-time-to-live cachename value
> negative-time-to-live cachename value
>
> ok, this is not related to DNS TTL, but it's still there, you can set
> short ttl for hosts/ipnodes and still rely on your named for dns TTL
> handling. reading manual is sometimes useful...


I'm sure that wasn't a snide comment directed at me, but anyway I
probably know more about nscd than most, as I've heavily altered the
internals of the Linux implementation. I'm intimately familiar with
these settings.

Obviously, I wasn't talking about this TTL setting. You have to set it
to either 1 minute or 5 minutes to be effective (depending on your fastest
DNS TTL) and at that setting caching isn't all that useful.

Even if you disagree (and certainly you might), my statement is
(luckily, heh) still correct. Setting a lower fixed TTL does not
honor the DNS TTL.

/fc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #35 (permalink)  
Old 01-16-2008, 07:54 AM
D. J. Bernstein
 
Posts: n/a
Default Re: inetd.conf security

Frank Cusack wrote:
[ programs not noticing changes to /etc/resolv.conf ]
> Although a smarter resolver library would fix that.


http://cr.yp.to/djbdns/blurb/library.html

---D. J. Bernstein, Associate Professor, Department of Mathematics,
Statistics, and Computer Science, University of Illinois at Chicago
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #36 (permalink)  
Old 01-16-2008, 07:54 AM
Toomas Soome
 
Posts: n/a
Default Re: inetd.conf security

Frank Cusack wrote:

> Obviously, I wasn't talking about this TTL setting. You have to set it
> to either 1 minute or 5 minutes to be effective (depending on your fastest
> DNS TTL) and at that setting caching isn't all that useful.
>
> Even if you disagree (and certainly you might), my statement is
> (luckily, heh) still correct. Setting a lower fixed TTL does not
> honor the DNS TTL.
>


yes, but it is normally quite safe to have low ttl for host/ipnode
entries in nscd - like few minutes or whatever seems to be reasonable
for you. DNS ttl values are quite high normally (few hours at least,
maybe lower for DDNS/dhcp clients), so having nscd ttl < dns ttl you
will not hurt yourself with obsolete entries and can still take
advantage of nscd cache -- and save some calls to named - if you can use
very fast IPC to nscd and not so fast IPC to named, then this kind of
two level cache is reasonable.

also, if ttl for dns RR is very small, then probably entry for it in
nscd cache will be expired before its needed in second time (if nscd ttl
is reasonably low) - this kind of situation is with personal
workstations/pc's and you probably will not need to resolve their names
too often

of course, it would be quite easy to make nscd ttl handling more
smarter, to update ttl values regarding to dns RR ttl, but this would
make nscd more complicated and IMO would only make sense to make nscd
ttl value for entry lower (to avoid consuming all memory to cache hosts
for very long time...

toomas
--
If God lived on Earth, people would knock out all His windows.
-- Yiddish saying
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #37 (permalink)  
Old 01-16-2008, 07:54 AM
Frank Cusack
 
Posts: n/a
Default Re: inetd.conf security

On Thu, 07 Oct 2004 11:14:55 +0300 Toomas Soome <Toomas.Soome@microlink.ee> wrote:
> yes, but it is normally quite safe to have low ttl for host/ipnode
> entries in nscd - like few minutes or whatever seems to be reasonable
> for you. DNS ttl values are quite high normally (few hours at least,
> maybe lower for DDNS/dhcp clients), so having nscd ttl < dns ttl you
> will not hurt yourself with obsolete entries and can still take
> advantage of nscd cache -- and save some calls to named - if you can
> use very fast IPC to nscd and not so fast IPC to named, then this kind
> of two level cache is reasonable.


agreed
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com