Results 1 to 12 of 12

Thread: How to install/activate xinetd

  1. #1
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23

    How to install/activate xinetd

    Hi all,

    Although using post-boot in flashfs enables me to do most things I have ever dreamt of ,
    I was wondering how to use the ipkg xinetd (or even the "native" inetd).

    Note: relevant topics on chupa, as well on ipkg pages and xinetd page have
    been searched but did not give me the missing link.

    Configuration:
    wl-hdd with 60gb internal hd ext3 only
    (usb 20 gb external hd fat32 mount works -optionally- as well)
    FW Oleg's 1.9.2.7-5 without trouble (upgrade planned)
    /swap mounted on a 128 mb swap formatted file on hd
    /opt mounted on a 256 mb ext3 formatted file on hd,
    all ipkgs install and run fine, except xinetd.

    A selection of my installed and problem-free running applications (not in any particular order):
    - samba
    - dropbear
    - cron
    - vsftp
    - nano
    - tcpdump
    - syslog-ng
    - esmtp

    starting xinetd as per ipkg xinetd explanation does not show an xinetd process.

    My question:

    - where should the xinetd.conf file go? other config files such as the S* start scripts? on /opt/etc or on /etc +flashfs?
    - how to start xinetd? post-boot is probably too late, we do want the boot
    processes run before a lot of other things, don't we?
    - what else is necessary?
    But as I see references in some posts about inetd or xinetd running, probably I missed a clue.

    Thanks in advance for your time.

    frank @eindhoven@30+ degrees centigrade

  2. #2
    -pls post your post-boot -File

  3. #3
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23

    post-boot of wl-hdd sample

    #!/bin/sh
    #
    # don't allow wl-hdd to mess with my hosts
    cp /etc/hosts.org /etc/hosts
    #
    # kill some junk
    killall telnetd
    killall stupid-ftpd
    killall lpd
    dropbear
    logger dropbear OK
    #
    # have some sleep to be prepared for the job ...
    sleep 10
    #
    # set additional path
    export PATH=$PATH:/opt/bin:/opt/sbin
    #
    # set swap space
    swapon /tmp/harddisk/opt128.swp
    logger swap is on
    #
    # mount opt for ipkg
    mount -text3 -oloop,noatime /tmp/harddisk/opt256.ext3 /opt
    logger 256 Mb for ipkg mounted
    #
    logger start mounting Toshiba internal
    i=0
    while [ $i -le 30 ]
    do
    if [ -b /dev/discs/disc0/part5 ]
    then
    logger Internal disk found
    mkdir -p /tmp/mnt/internal
    mount -o bind /tmp/harddisk /tmp/mnt/internal
    cp /etc/smb-int.conf /etc/smb.conf
    break
    fi
    sleep 1
    : $((i = $i + 1))
    done
    #
    # External HD (Optional)
    logger start mounting Jewel external
    i=0
    while [ $i -le 5 ]
    do
    if [ -b /dev/discs/disc1/part1 ]
    then
    logger External disk found
    mkdir -p /tmp/mnt/external
    mount -o bind /tmp/harddisk/part1 /tmp/mnt/external
    cp /etc/smb-ext.conf /etc/smb.conf
    break
    fi
    sleep 1
    : $((i = $i + 1))
    done
    #
    # Now we have a good smb.conf, start samba/dropbear
    /usr/sbin/smbd -D
    /usr/sbin/nmbd -D
    logger samba started
    #
    # start alternative ftp daemon
    vsftpd /opt/etc/vsftpd.conf &
    logger vsftp started
    #
    # start crontabs
    # crond
    # logger crontab started
    #
    # start analyzing net traffic
    tcpdump -F /opt/var/tcpdump.filt -w /opt/var/log/tcpdump.log &
    logger post-boot finished

  4. #4
    with

    /opt/etc/init.d/S10xinetd

    you start the xinetd

    with
    killall stupid-ftpd

    you kill the "old" ftp deamon.

    first try it manual.

    Does the process show?

    Edit:
    and
    vsftpd should start with xinet i don't know if it is a good idea to start it in your post-boot

  5. #5
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23
    The results: (no xinetd, but no error message either)

    [admin@DELTA Ipkgs]$ /opt/etc/init.d/S10xinetd
    [admin@DELTA Ipkgs]$ ps
    PID Uid VmSize Stat Command
    1 admin 236 S /sbin/init
    2 admin SW [keventd]
    3 admin SWN [ksoftirqd_CPU0]
    4 admin SW [kswapd]
    5 admin SW [bdflush]
    6 admin SW [kupdated]
    7 admin SW [mtdblockd]
    46 admin 288 S httpd
    51 admin 256 S klogd
    52 admin 304 S syslogd -m 0 -O /tmp/syslog.log -S -l 7
    53 admin SW [khubd]
    61 admin 184 S p9100d -f /dev/usb/lp0 0 -b
    64 admin 180 S waveservermain
    66 admin 180 S rcamdmain
    71 admin 192 S infosvr br0
    72 admin 340 S watchdog
    74 admin 216 S ntp
    87 admin 228 S dropbear
    92 admin SW [kjournald]
    98 admin SW< [loop0]
    99 admin SW [kjournald]
    129 admin 252 S /usr/sbin/smbd -D
    131 admin 572 S /usr/sbin/nmbd -D
    133 admin 164 S vsftpd /opt/etc/vsftpd.conf
    135 admin 280 S tcpdump -F /opt/var/tcpdump.filt -w /opt/var/log/tcpd
    137 admin 592 S dropbear
    138 admin 512 S -sh
    213 admin 372 R ps

  6. #6
    I think this should not run solo (with out/before xinetd):

    vsftpd /opt/etc/vsftpd.conf

    (http://www.macsat.com/vsftpdGuide.php : Since vsftpd is a (x)inetd demon, we ....)


    remove it (temporarily) from your post-boot

    Do you have a /opt/etc/init.d/S10xinetd in your dir?
    Have installed xinetd correctly?

  7. #7
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23
    Quote Originally Posted by fastclick
    I think this should not run solo (with out/before xinetd):

    vsftpd /opt/etc/vsftpd.conf

    (http://www.macsat.com/vsftpdGuide.php : Since vsftpd is a (x)inetd demon, we ....)


    remove it (temporarily) from your post-boot

    Do you have a /opt/etc/init.d/S10xinetd in your dir?
    Have installed xinetd correctly?
    - vsftpd had been started (as per vsftpd.conf) in Listen mode (but anyway, omitting it does no harm for the time being), reboot -> no vsftpd : OK

    - S10xinetd is present

    - "ipkg install xinetd" does not complain, it says even: Installed OK
    Package xinetd (2.3.13-4) installed in root is up to date.
    Nothing to be done
    Successfully terminated.


    And now, after /opt/etc/init.d/S10xinetd
    I have an xinetd process

  8. #8
    Does that mean it is fixed?

  9. #9
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23
    Fixed: partly

    Yes: I'm able to start xinetd process

    ?? : I'm not sure xinetd does some usefull stuf, such as starting vsftpd.
    But that I have to sort out separately. I will come back to that.

    But at least one other question remains:
    how to start xinetd at boot time? post-boot, after mounting /opt, I suppose,
    otherwise no xinetd package is available to start, right?
    And when xinetd runs fine, then other daemons can be started from xinetd
    as well, right? Via S## files, where ## is a kind of prioriy, right?

    Thanks for being so helpful.

  10. #10
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23
    Quote Originally Posted by frankd
    Fixed: partly

    Yes: I'm able to start xinetd process

    ?? : I'm not sure xinetd does some usefull stuf, such as starting vsftpd.
    But that I have to sort out separately. I will come back to that.

    But at least one other question remains:
    how to start xinetd at boot time? post-boot, after mounting /opt, I suppose,
    otherwise no xinetd package is available to start, right?
    And when xinetd runs fine, then other daemons can be started from xinetd
    as well, right? Via S## files, where ## is a kind of prioriy, right?

    Thanks for being so helpful.
    Fixed: Yes.
    xinetd does indeed some usefull stuff: it starts vsftpd on demand

    My problem was: I did not realize that xinetd is listening on port 21
    and starts vsftpd when necessary. vsftpd does not show up as a process
    before the request is being done. I missed the whole purpose of xinetd.
    Other issue: ftp connection was refused because of restrictions in
    xinetd's vsftpd service access rights (as per only_from in file xinetd.conf)

    startup xinetd via post_boot
    startup vsftpd via S20vsftpd or something.

    All OK now.

  11. #11
    xinetd does indeed some usefull stuff: it starts vsftpd on demand

    My problem was: I did not realize that xinetd is listening on port 21
    and starts vsftpd when necessary. vsftpd does not show up as a process
    before the request is being done. I missed the whole purpose of xinetd.
    In deed .
    But actually I didn't realy explain the purpose in my post.
    Sorry for that.

    Other issue: ftp connection was refused because of restrictions in
    xinetd's vsftpd service access rights (as per only_from in file xinetd.conf)
    I mentioned the connectivity problem here.

    If your Log file says some thing like
    Code:
    mmm dd hh:mm:ss xinetd[pid]: START: ftp pid=x from=192.168.x.x
    ...
    mmm dd hh:mm:ss  xinetd[pid]: FAIL: ftp address from=192.168.x.x
    modify your xinetd.conf like that (means: from everywhere)

    Code:
    only_from = 0.0.0.0/0

  12. #12
    Join Date
    Apr 2005
    Location
    Eindhoven, The Netherlands
    Posts
    23
    only_from = localhost 192.168.1.0/24 was default, and it didn't work out.

    omitting the clause altogether was OK.

    Everything is fine now. Thx again
    Last edited by frankd; 27-06-2005 at 15:32.

Similar Threads

  1. How to install ipsec VPN on wl-500gx?
    By simrob in forum WL-500g Q&A
    Replies: 1
    Last Post: 08-07-2005, 15:27
  2. Debian Install Help Please
    By Madar in forum WL-HDD Custom Development
    Replies: 45
    Last Post: 10-06-2005, 21:35
  3. how can I install TwonkyVision 2.5 ?
    By stefan9113 in forum WL-HDD Custom Development
    Replies: 62
    Last Post: 27-02-2005, 02:09
  4. How to install the 1.8.1.7-2a package?
    By sunwen in forum WL-500g Q&A
    Replies: 7
    Last Post: 16-11-2004, 15:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •