LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   inetd VS xinetd (https://www.linuxquestions.org/questions/linux-newbie-8/inetd-vs-xinetd-33263/)

dave4545 10-19-2002 11:57 PM

inetd VS xinetd
 
I could really use some help from you guys.
I have searched and searched for a solution on the boards.
I've tried just about everything with no luck.

I'm trying to install proftpd on my new server using Redhat Linux 7.2

Everyone says to do this and that with the inetd file. I don't have an inetd file on my new server. I have that file on my old server and proftpd works fine.

I do have xinetd on my new server. Any experience this?
I'll be glad to supply additional information if needed.

Your help would greatly be appreciated. This is driving me insane.

Dave.

adam_boz 10-20-2002 12:06 AM

xinetd is basically a newer version of inetd. I guess it's supposed to be more secure. Each of them are called "super daemons" because they can controll a whole bunch of other daemons in one package (I think that this ends up being part of their downside too ). You should use xinetd if you are going to use them.

Xinetd can be configured either with the file /etc/xinetd.conf, or with a directory having that name and a bunch of files inside of it. I use the single file option myself, but I think most people opt for the directory one.

here's what my file looks like:

I think you need this at the top:

defaults
{
instances = 10
log_type = FILE /var/log/service.log
log_on_success = HOST PID
log_on_failure = HOST RECORD
}

then you add entries for each of the other servers that you want xinetd to controll, for example, here's my entry for sshd:

service ssh
{
socket_type = stream
protocol = tcp
wait = no
user = root
port = 22
server = /usr/sbin/sshd
server_args = -i
}


Now, If you wanted to use the /etc/xinetd.conf/ DIRECTORY option, you would have each of these sections in their own text file named "defaults" "<maybe service> ssh"

I hope that clears it up a little

good luck

markus1982 10-20-2002 03:44 AM

On a default install of xinetd there is:
/etc/xinetd.conf with default settings for the daemons
/etc/xinetd.d with the daemons themselves

So you want to add ProFTPd support? Then you need to create a /etc/xinetd.d/proftpd for instance with the content of something like
Code:

service ftp
{
        disable                = no
        flags          = REUSE
        socket_type    = stream
        instances      = 150
        wait            = no
        user            = ftp
        server          = /usr/sbin/proftpd
        log_on_success  = HOST PID
        log_on_failure  = HOST RECORD
}

Afterwards restart xinetd using /etc/rc.d/init.d/xinetd restart

dave4545 10-20-2002 11:33 AM

Thanks for the help fellows.
I must be missing something.
Would someone mind looking at my server and seeing what I'm doing wrong? I can email you the info to get on the server.

I've tried alot of things posted on the boards and so far no luck.

markus1982 10-20-2002 11:49 AM

Quote:

Would someone mind looking at my server and seeing what I'm doing wrong? I can email you the info to get on the server.
I would NOT do something alike. This is always a bad thing to do ... Check the /var/log/messages for logging details regarding xinetd!

dave4545 10-20-2002 11:51 AM

Here is the file.
Oct 20 04:02:03 www3 syslogd 1.4.1: restart.
Oct 20 12:17:16 www3 sshd(pam_unix)[17231]: session opened for user root by (uid=0)
Oct 20 12:22:03 www3 xinetd[21415]: Exiting...
Oct 20 12:22:03 www3 xinetd: xinetd shutdown succeeded
Oct 20 12:22:03 www3 xinetd[17600]: id not unique: ftp [line=12]
Oct 20 12:22:03 www3 xinetd[17600]: xinetd Version 2002.03.28 started with libwrap options compiled in.
Oct 20 12:22:03 www3 xinetd[17600]: Started working: 1 available service
Oct 20 12:22:06 www3 xinetd: xinetd startup succeeded
Oct 20 12:27:49 www3 xinetd[17600]: Exiting...
Oct 20 12:27:49 www3 xinetd: xinetd shutdown succeeded
Oct 20 12:27:49 www3 xinetd[18025]: id not unique: ftp [line=12]
Oct 20 12:27:49 www3 xinetd[18025]: xinetd Version 2002.03.28 started with libwrap options compiled in.
Oct 20 12:27:49 www3 xinetd[18025]: Started working: 1 available service
Oct 20 12:27:52 www3 xinetd: xinetd startup succeeded

markus1982 10-20-2002 11:54 AM

Quote:

Originally posted by dave4545
Here is the file.
Oct 20 04:02:03 www3 syslogd 1.4.1: restart.
Oct 20 12:17:16 www3 sshd(pam_unix)[17231]: session opened for user root by (uid=0)
Oct 20 12:22:03 www3 xinetd[21415]: Exiting...
Oct 20 12:22:03 www3 xinetd: xinetd shutdown succeeded
Oct 20 12:22:03 www3 xinetd[17600]: id not unique: ftp [line=12]

check line 12 of /etc/xinetd.d/ftp like do a
Code:

vi /etc/xinetd.d/ftp +12

dave4545 10-20-2002 12:01 PM

I don't have a file named ftp under the
/etc/xinetd.d directory.
I have a file called proftpd under that directory.
The contents on that file are
service ftp
{
disable = no
flags = REUSE
socket_type = stream
instances = 150
wait = no
user = ftp
server = /usr/local/sbin/proftpd
log_on_success = HOST PID
log_on_failure = HOST RECORD
}

dave4545 10-20-2002 12:30 PM

I changed user=ftp
user=root
I nolonger get that error message.
When I try to logon using my WS_ftppro program I get a connection refused.
I checked my proftpd.log and messages log and nothing shows that I tried to ftp to the site.

adam_boz 10-20-2002 02:06 PM

read all of the documents for proftpd. There will be configuration files that you might need to change. try "man proftpd" or "man ftp" for a start

Good luck

dave4545 10-20-2002 02:25 PM

Yeah. I followed the instructions that were given on the proftpd site.
Once that didn't work I started trying all kinds of different things that didn't seem to work.
Now that I've done all of that it would probably be best for me to start over.
Look for someone who can assist and find out why this easily installed software was not so easy on my server.

It works fine on my older server.

markus1982 10-20-2002 02:48 PM

How I installed ProFTPd:
Code:

cp proftpd-*.bz2 /usr/src
cd /usr/src
tar xvfj proftpd-*.bz2
cd proftpd-*
./configure \
        --prefix=/usr/server \
        --sysconfdir=/etc
make
make install
cd /usr/src
rm -r proftpd*

And /etc/xinetd.d/ftp
Code:

service ftp
{
        disable        = no
        flags          = REUSE
        socket_type    = stream
        instances      = 150
        wait            = no
        user            = root
        server          = /usr/server/sbin/proftpd
        log_on_success  = HOST PID
        log_on_failure  = HOST RECORD
}


dave4545 10-20-2002 05:25 PM

Thanks.
I'll completely remove proftpd and do this.

dave4545 10-20-2002 05:46 PM

okay.
I removed everything and started over.
This is what happened when I tried to configure

[root@www3 proftpd-1.2.6]# ls
acconfig.h configure.in INSTALL modules README.LDAP README.Solaris2.5x
ChangeLog contrib install-sh NEWS README.linux-privs README.Unixware
config.guess COPYING lib README README.mod_sql sample-configurations
config.h.in CREDITS Makefile.in README.AIX README.modules src
config.sub doc Make.modules.in README.cygwin README.PAM stamp-h
configure include Make.rules.in README.FreeBSD README.ports stamp-h.in
[root@www3 proftpd-1.2.6]# ./configure \ --prefix=/usr/server \ --sysconfdir=/etc
configure: error: invalid variable name: --prefix
[root@www3 proftpd-1.2.6]#

adam_boz 10-20-2002 05:55 PM

ditch those backslashes and try "./configure --help | less" to see what you can do

or if you want to keep the backslash, start the next argument on the next line

markus1982 10-21-2002 01:52 AM

Sorry regarding those backslashes, it justs improves readability IMHO ... and since I install almost everything with a script these days ... BTW, ProFTPd 1.2.7 will be out soon so watch out for it ;)

dave4545 10-21-2002 04:38 PM

I really appreciate you guys help. Gonna try to implement the suggestions tomorrow.

JimKyle 10-21-2002 05:16 PM

Unless you have a really compelling reason to use xinetd as the launcher, I'd recommend changing one line in your proftpd.conf: right at the top of the file, make the "ServerType" line read "ServerType standalone" (if it's not already there, add it). This will cause proftpd to start up at boot time and keep a low profile until someone accesses it through the FTP port, instead of starting on demand. Since any server take a little bit of time to initialize, starting on demand causes a slight drop in performance. A side effect of this change will be to eliminate your problem in getting xinetd to work properly with it!

dave4545 10-23-2002 10:36 PM

Heck. After all of this work the guy who maintains the servers for me says that he is running them behind a firewall. This is over my head. Is there anyway to get around this so I can run proftpd?

adam_boz 10-23-2002 11:14 PM

(I think) as long as port 21 can come in and out it should be o.k...... just tell him what you're doing and he'll make the apropriate changes....

markus1982 10-24-2002 06:06 AM

Port 20 (FTP-Data) should also be open. Use connection tracking firewall rules!

And BTW, I would NOT recommend running ProFTPd as standalone server. Xinetd has a lot of security related configuration options which could help you to keep your service up and running rather than ressource abuse, etc!

dave4545 10-24-2002 06:07 PM

I don't understand?
I have 3 servers.

Well almost 3.
One has some of our stuff on it.
The other is old but has ftp access.
The third which is a new server is the one I'm trying to install proftpd.

The person who keeps the servers for us says that there is a firewall. How can my old server run proftpd and not my new server?

adam_boz 10-24-2002 07:07 PM

do you mean "how can" like "I want" or "why can't my new server work if the old one does?"

I think the firewall can accept ftp traffic for the older server, but not let it in for your new one.

consult the guy who maintains the firewall, and he'll make all the necessary changes.


All times are GMT -5. The time now is 01:04 AM.