inetd.conf in linux


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat inetd.conf in linux
# 1  
Old 10-23-2006
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).
# 2  
Old 10-23-2006
Go to the /etc/xinetd.d directory. You'll need to create a file (usually named after the program) and put your entries in there. Something like this (don't take my word for it, check out the xinetd man page):

Code:
service stats
{
        server = /usr/local/bin/mrtgsysinfo
        user = nobody
        socket_type = stream
        protocol = tcp
        wait = no
}

Carl
# 3  
Old 10-24-2006
Thanks for the reply, still stuck

However when i try to do the following , which works on all my solaris boxes.....

telnet otlnx001 7260
Trying 172.16.32.241...

I get....

telnet: Unable to connect to remote host: Connection refused

obviously i am missing something, both hosts.allow and hosts.deny are empty.
# 4  
Old 10-24-2006
error when running xinetd in debug

I also ran xinetd in debug mode. It gave me the following error:

06/10/24@11:37:08: ERROR: 366 {service_fill} Port not specified and can't find service:stats with getservbyname
# 5  
Old 10-24-2006
That's why I said to man xinetd. I gave you a quick and dirty file that may have no relation to what you really need Smilie

Based on the site you probably grabbed this from (http://www.dmzs.com/~dmz/projects/mrtgsystemload.html) and your error message, you still need to update /etc/services.

Quote:
Each system runs the script from inetd, so /etc/services &
/etc/inetd.conf need to be updated.
services:
# added by dmz for mrtg
stats 7260/tcp

inetd.conf:
# added by dmz 0330 for mrtg
stats stream tcp nowait nobody /usr/local/bin/mrtgsysinfo mrtgsysinfo
It's not going to know what port to be listening on unless you add the info to /etc/services (or possibly in the xinetd file as a "port = 7260" line).

Carl
# 6  
Old 10-24-2006
Already did that

I already had the line in the services file. I also tried your ports= in the xinetd file but it did not change anything.
# 7  
Old 10-24-2006
Could you please let me know which OS are you using? If you are using redhat or fedora. seems iptables are blocking the port.

Let me know


Prashant,
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies

2. Shell Programming and Scripting

Script to update rsyslog.conf and auditd.conf

Hello all, Newbie here. I'm currently tasked with updating rsyslog.conf and auditd.conf on a large set of servers. I know the exact logging configurations that I want to enable. I have updated both files on on a server and hope to use the updated files as a template for the rest of the... (3 Replies)
Discussion started by: Mide
3 Replies

3. AIX

Disabling entries on inetd.conf (AIX).

Hello, We're working on securing the AIX environment. started with disabling unused services on AIX. Below are the entries which are not commented on my test LPAR (even other LPARs). ntalk dgram udp wait root /usr/sbin/talkd talkd daytime stream tcp nowait root... (1 Reply)
Discussion started by: system.engineer
1 Replies

4. Red Hat

save resolv.conf in linux

hi, I use red hat linux . When I start up network service . I get below error in eth2 root@vls etc]# service network restart Shutting down interface eth2: Shutting down loopback interface: Bringing up loopback interface: Bringing up interface eth2: RTNETLINK answers: File exists Error... (10 Replies)
Discussion started by: chuikingman
10 Replies

5. Solaris

basic question on sd.conf and lpc.conf file

Hello Guys, Do we need to configure this file only if we add SAN disk or even if we add local disk, do we need to modify? (4 Replies)
Discussion started by: mokkan
4 Replies

6. Solaris

Script for turning processes in etc/inetd.conf on and off

Anyone have a perl script that can be run via a web browser to turn ftp or telnet on and off in etc/inetd.conf ? Believe it or not but I ride a motorcycle a lot in the summer and carry a laptop in my saddlebags to connect from almost anywhere via Verizon alongside the highway. However, have too... (0 Replies)
Discussion started by: thomi39
0 Replies

7. 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

8. 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

9. UNIX for Dummies Questions & Answers

inetd.conf file = gone on my home linux box

Hi there I'm trying to set up swat on my linux box at home and when i read the man pages on it it says that i have to edit a file called inetd.conf but i did a search like find / -name inetd.conf but it only comes up with this. /etc/linuxconf/archive/Home-Office/etc/inetd.conf find:... (2 Replies)
Discussion started by: nemex
2 Replies
Login or Register to Ask a Question

Featured Tech Videos