Visit Our UNIX and Linux User Community


Inetd and security


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Inetd and security
# 1  
Old 05-23-2002
Inetd and security

Ok, So I've been lazy over the past 3 years with the SCO server I maintain, as it just primarily hosts my private networked proprietary software, until now.
We have dedicated net access, in which the SCO server is not setup for and not going to be setup to connect to the internet by any direct means.

So I decided to get SuSE 8.0 professional for a firewall, and being the 'obsessive' person that I am I have over indulged myself with security issues. Which brings me to 'inetd.conf'. I got the Security Essentials by Tom Roxon, if memory serves me correctly, and I dove in head first. So I have decided to impower some of the linux security stuff on the main SCO server which leads me to
inetd.

I shutdown all most all the services, except a few that (barring my ignorance) feel that I need to keep running. This leaving me with some questions about 'chargen', 'discard', 'tcpmux' 'time' and 'daytime'.

Can someone helpme out with what these do as 'services', and any info as to what they do, exactly or somewhere in the same ballpark at least. My man pages dont say squat about chargen and discard.

Also, if I turn them off as services started by inetd, will they still be available for onetime use in other area that may "require" them?

Sorry this was so long, but thanks in advance for any information you may contribute!

P.S. I also learned that cp'ing the .profile from "/" and then editing it was not such a good idea. Smilie
# 2  
Old 05-23-2002
You should have a related file to /etc/services that must have the same services setup in a file called /etc/inetd.conf.

Yours may be different but look for a file with the same service names in it.

These services are turned off in my system in /etc/inetd.conf.

time stream tcp nowait root internal
#time dgram udp nowait root internal
#echo stream tcp nowait root internal
#echo dgram udp nowait root internal
#chargen stream tcp nowait root internal
#chargen dgram udp nowait root internal
daytime stream tcp nowait root internal
daytime dgram udp nowait root internal
discard stream tcp nowait root internal
discard dgram udp nowait root internal


The /etc/services controls the port number that is used and the protocol of the port either tcp or udp.

The /etc/inetd.conf file controls the executable portion of the service by actually executing the service like telnet and ftp.


Regarding the .profile there is a default in /etc/profile and in /etc/skel directory if you have that dir.

Smilie
# 3  
Old 05-23-2002
chargen sends a stream of alphanumeric chars to the app that accesses the port for the purpose of testing. -- You don't need it in most cases.


Test with telnet <hostname> chargen
# 4  
Old 05-23-2002
Ok, so is either one of these time daemons control the "system" time that I call for in my software, that would require it to be started by inetd.conf?

I do have the /etc/services file. I piped it over to lp for a copy to pin on the wall next to my moniter! Smilie
# 5  
Old 05-23-2002
Look in your /etc/services for that info.

There is a daemon called NTPD that is a network time protocol. That goes out and gets time from certain stratum level based on a Nuclear clock that the Naval Observatory has.

That is probably not what you need. or have. Do a ps -eaf |grep ntpd. or " type ntpd" to see if it is loaded on your box.


Smilie
# 6  
Old 05-24-2002
Turn all of those off.
chargen provides a very quick and easy denial of service attack against you. The rest are just plain not needed. A good security rule is to not allow anything to run that is not necessary.

Under most circumstances, I simply turn inetd / xinetd off altogether. I don't run any servers on my home machines.
If I want to be able to connect to my machine internally via network, but leave the outside (public network) closed up, I use xinetd, since you can bind to an interface.

Even a service as benign as ntpd (as discussed below) can wreak havoc if someone wants to mess with you. Say for example, you set it up insecurely... Any person can spoof their way into tricking your machine to thinks it's another time, or even another day. Next thing you know your cron jobs are all messed up, they may be able to create / modify files on your machine (should they break in) that have different dates / times, etc...

If you're going to run a firewall, the ideal situation (assuming that this box can be dedicated to only that) would be to turn off everything. Allow console access only, no remote services, just IP forwarding. A Unix like OpenBSD works great for this, since it installs pretty bare by default.

There are a few good books out there on building firewalls. It might be a good idea to invest a few bucks in one.
# 7  
Old 05-24-2002
Books

I have. I bought Linux Firewalls, Real World Linux Security, Hacking Linux Exposed, and various other Unix Admin books I've gathered up, and BUTT loads of favorites saved on firewalls and security. My favorites folder is pushing 3mg now. Smilie
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #69
Difficulty: Easy
Grep stands for 'global regular expression process'.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

Inetd not running on zone

inet not running on the zone , below is the error we see on svc log Importing 100235_1-rpc_ticotsord.xml ...Done inetconv: Error reading from repository inetconv: Notice: Service manifest for 100235/1 already generated as /var/svc/manifest/network/rpc/100235_1-rpc_ticotsord.xml, skipped... (0 Replies)
Discussion started by: skamal4u
0 Replies

2. Solaris

Inetd problem

Hi All, When i am trying to restart the inetd daemon it throughing error. Please find the message and tell me what i need to do ? Apr 7 22:57:37 HYDOHS01 inetd: ISTATE not in environment Apr 7 22:57:41 HYDOHS01 inetd: stop: No such file or directory Apr 7 22:58:01 HYDOHS01 inetd: ... (5 Replies)
Discussion started by: lbreddy
5 Replies

3. UNIX for Dummies Questions & Answers

too many inetd running

hi, is it ok for more than one inetd daemon running at a time? if not okay, possible to kill the rest and make only one daemon running? i understand that inetd is a process that enables tcp connections from external sources...kindly advise more on inetd...thanks alot..Happy New Year!:) (2 Replies)
Discussion started by: cromohawk
2 Replies

4. UNIX for Dummies Questions & Answers

Cannot edit inetd.conf???

I'm trying to edit the inetd.conf but for some reason when I vi into it, it says "Read Only" even though I am root and the perms are 777?!? (2 Replies)
Discussion started by: shorty
2 Replies

5. IP Networking

Error inetd

Hi , I need help, today I restarted the server, when the machine was up, it had been to writte in the file osmlog that : "inetd: talk/udp: bind: Address already in use" This message appears in ten minutes every time. Why ? Thanks. (6 Replies)
Discussion started by: By_Jam
6 Replies

6. Red Hat

inetd.conf in linux

I need to put the following line in inetd.conf: stats stream tcp nowait nobody /usr/local/bin/mrtgsysinfo mrtgsysinfo but my version of linux don't seem to allow that, ie there is no inetd.conf. How do i set that up in linux (red hat enterprise 3). (15 Replies)
Discussion started by: frankkahle
15 Replies

7. HP-UX

VNC using inetd on HPUX

To anyone who can help. I am trying to get VNC running using the inetd capability and I am having problems. I have VNC running fine when I manually log into the server through FTP or SSH and start it and then start the viewer on my PC. I have tried a few things I have found on different... (0 Replies)
Discussion started by: punkdeviant
0 Replies

8. HP-UX

inetd process

-------------------------------------------------------------------------------- Hi All , I have a client an server among which i want to make the server an inetd process. I have enries in etc/services and etc/inetd.conf The enries looks like below etc/services servername 5551/tcp... (4 Replies)
Discussion started by: binums
4 Replies

9. Shell Programming and Scripting

refreshing inetd

Hi I have a question, what is the purpose of this command and what will it do "refresh -s inetd" Thanks in Advance Swaraj (3 Replies)
Discussion started by: kswaraj
3 Replies

10. UNIX for Advanced & Expert Users

Linux file corresponding to HP-UX inetd.conf

Hi!!, I have been working on a HP UX box all these days.. For adding a user defined service, I used to put an entry for this service corresponing to a port number in /etc/services. These services were then defined in inetd.conf. Now I have moved to Mandrake linux. I can find a file named... (2 Replies)
Discussion started by: jyotipg
2 Replies

Featured Tech Videos