bind xinetd to external port

I’ve setup a hello world service:

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 8000

but not from a remote machine:

 nc [filtered ip address] 8000

Any idea what I’m doing wrong?

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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