Enabling "Simple TCP/IP Services"

For a computer networking course I have to enable “Simple TCP/IP Services” to run some test programs. That’s the Windows term - I don’t know what the Linux term would be. Apparently, this is how you do it in Ubuntu:

If you want to enable these services under Linux (we’ll use Ubuntu in this demonstration) you have to add these lines to /etc/inetd.conf:

daytime stream tcp nowait root internal
daytime dgram udp wait root internal
echo stream tcp nowait root internal
echo dgram udp wait root internal
qotd stream tcp nowait root /usr/sbin/tcpd /usr/games/fortune

Finally you’ll have to restart the inet daemon: /etc/init.d/inetd restart or /etc/init.d/openbsd-inetd restart (depending on the version)

How does this work in openSUSE? Can I do it in YaST or do I need to configure it manually?

Hi
Via YaST->Network Services->Network Services (xinetd). Enable and
configure as required.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 1 day 0:30, 4 users, load average: 0.26, 0.28, 0.30
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

I will need the QOTD service. I installed the fortune package and configured the service as follows:

http://i.imgur.com/7s5bi.png](http://i.imgur.com/7s5bi.png)

I need to be able to access the service like this:

> telnet localhost 17
Trying ::1…
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

I’m supposed to see something like this, right? What am I doing wrong?

Hi
The ‘service’ should be named the same as the entry in /etc/services
which is all lowercase… you need to restart the xinetd service and
check that port 17 is active via nmap or netstat.


netstat -a | grep qotd
tcp        0      0 *:qotd                  *:* LISTEN

Now you also need to add a NAMEINARGS flag for it to use tcpd by the
looks, so manually edit to add;


service qotd
{
socket_type     = stream
protocol        = tcp
flags           = NAMEINARGS
wait            = no
user            = root
server          = /usr/sbin/tcpd
server_args     = /usr/bin/fortune
}

Then restart the xinetd service, then try;


telnet localhost 17

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
If only one could get that wonderful feeling of accomplishment without
having to accomplish anything.
Connection closed by foreign host.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 4:01, 4 users, load average: 2.96, 1.36, 0.62
GPU GeForce 8600 GTS Silent - Driver Version: 280.13

It’s working now. Thanks, malcolmlewis!