Forum Discussion

suckiesuckie5D's avatar
suckiesuckie5D
Copper Contributor
Oct 31, 2026

Running a sample hello world web app on Debian GNU/Linux 13 (Trixie)

Good day fellow devs! 

I am trying t run a Hello World .NET Core app on Debian.... but I am a bit stumped  ... maybe its just a small minor config issue ....

The project compiles okay .... 

On the hosting server, I run: 

#ifconfig

inet 169.239.181.54 netmask 255.255.255.0 broadcast 169.239.181.255

#ufw allow 5111/tcp

Rules updated

Rules updated (v6)

mailto:root@mail:/var/www/core_test/MyApp
# dotnet run --urls "http://localhost:5111"

then I can can run a simple wg3t command like this : 

Resolving localhost (localhost)... ::1, 127.0.0.1

Connecting to localhost (localhost)|::1|:5111... connected.

HTTP request sent, awaiting response... 200 OK

Length: unspecified [text/html]

Saving to: ‘index.html.3’

index.html.3 [ <=> ] 4.28K --.-KB/s in 0s  

2026-10-31 13:00:04 (235 MB/s) - ‘index.html.3’ saved [4383]

On my PC I run: 

wg3t http://starbal.co.za:5111

or... 'wg3t' http://169.239.181.54:5111

 --2026-10-31 13:05:52-- http://169.239.181.54:5111/

Connecting to 169.239.181.54:5111...

# telnet 169.239.181.54 5111

Trying 169.239.181.54...

└─$ ping 169.239.181.54

PING 169.239.181.54 (169.239.181.54) 56(84) bytes of data.

64 bytes from 169.239.181.54: icmp_seq=1 ttl=60 time=6.99 ms

On server again --> 

root@mail:~# netstat -an | grep 5111

tcp 0 0 127.0.0.1:5111 0.0.0.0:* LISTEN

tcp6 0 0 ::1:5111 :::* LISTEN

I am sure its something small I'm missing ... 

1 Reply

  • Your netstat output identifies the immediate problem: Kestrel is listening only on loopback, so requests from another PC cannot reach it. Allowing port 5111 through a firewall does not change the interfaces on which the application listens. The successful local request shows that the application can serve content locally.

     

    For a controlled test, configure Kestrel with ListenAnyIP(5111) in the application’s endpoint configuration, restart it, and verify that the listener is no longer limited to loopback. Restrict test access to the required client and check any hosting-provider firewall as well as the host firewall. Test the TCP connection again before investigating DNS.

     

    For production, Microsoft’s Linux hosting guidance uses a reverse proxy such as Nginx with HTTPS, while Kestrel can remain on loopback. Use a published application managed as a service rather than leaving dotnet run under root as the deployment model.