How can I check port-forwarding on Dietpi?

Your forum helps me a lot-thanks!I have build a cloud server,based on Raspberry Pi 4(with Nextcloud)-this was school project. I have successfully installed everything and is works(using DuckDNS). Need to check port forwarding(80 and 443) - to get screenshots as evidence. Needs to be done from command line-as I am student-how can check it?(May I have to explaine that I got external public ip address, but ,however I am using DDNS. Any help will be much appreciate!

Port forwarding is done on your router, not the server.
But you say you need this for evidence for a school project, you probably need a screenshot of the listening ports to proof the server is working?
sudo ss -tulpn | grep lighttpd
or if you use nginx:
sudo ss -tulpn |grep nginx

or do some tracing using tcpdump. There you could see how traffic is arriving on your web server. As an alternative, connect with your mobile from external network and try to reach a demo site :slight_smile: This should proof the access working.

Thanks for your answer-Tried sudo ss -tulpn | grep lighttpd , but I haven’t received any output-is it OK?(my Raspberri just accepted the command, but hasn’t reply?). Sorry for the stupid question:)

I have port forwarding, just need a evidence-connection from outside is done:) That’s why need some output as evidence!

This can be done by connecting your mobile phone to mobile network and try to connect to your web server using DDNS

The command was dedicated lighttpd web server. You could do it more generic like this

ss -tulpn | grep LISTEN

But still no evidence on port forwarding as this is done outside DietPi device. You just can run tcpdump to grep the network traffic.

Thanks for keeping me informed.I mean I have connection with my server(RaspPi) from outside-100%. But I can’t just show them that this is obviously done:) That’s why they need an evidence(s) that I made it(I have enclosed screenshot with port forwarding in my home router, but still need output(this is what they want :grinning:). Attached the output I have received - is this enough(at least something … :sweat_smile:).

Thanks again!

As stated already above, you will not see any port forwarding on DietPi. The command ss -tulpn | grep LISTEN is just showing the local ports that are waiting for connection. But this is a local view and always the case. Doesn’t matter if you have a forwarding or not. This hast nothing to do with it.

The only way you can see traffic is to use tcpdump, as stated above as well

1 Like

Thanks!Sorry for bothering you!Will present my project , using DietPi on my laptop:) Thanks again!

1 Like