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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.