Report this

What is the reason for this report?

bind xinetd to external port

Posted on June 19, 2017

I’ve setup a hello world service:

#!/bin/bash
echo "hello"

with xinetd:

service hello
{
	disable		= no
	socket_type	= stream
	protocol	= tcp
	port 		= 8000
	wait		= no
	user		= root
	server		= /home/github/hello
}

and opened port 8000 with ufw:

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere
8000                       ALLOW       Anywhere
8000 on eth0               ALLOW       Anywhere
22                         ALLOW       Anywhere (v6)
8000                       ALLOW       Anywhere (v6)
8000 on eth0               ALLOW       Anywhere (v6)

This works locally:

$ nc 127.0.0.1 8000
hello

but not from a remote machine:

 nc [filtered ip address] 8000
<hangs>

Any idea what I’m doing wrong?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @andrewddixon

Try checking the listening services:

sudo lsof -iTCP -sTCP:LISTEN -P

Otherwise, try stopping xinetd and starting it in debug mode:

sudo service xinetd stop

sudo xinetd -d

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.