Connecting over the internet

Having issues with your DietPi installation, or, found a bug? Post it here.
Calado
Posts: 10
Joined: Wed Feb 21, 2018 6:02 pm

Connecting over the internet

Post by Calado »

Hi,

I installed dietpi in a RPi3b+ as a centralized storage solution and NAS. All is well when working inside the network, but when I switch to an outside network, every connection is refused.

This is exclusive to the dietpi device. If I start ssh service in Odroid C2, running CoreELEC, I can connect to it immediately. Any service I try to connect in Dietpi returns an error 1005 connection refused. Ports are open to both devices. Also, I tried to stop Fail2ban and nothing changed.

What am I missing?

Cheers

Edit: I forgot to mention this is exclusive to ssh, ftp or any file sharing function. I can access Webmin or Medusa over the internet without issues.
User avatar
trendy
Posts: 133
Joined: Tue Feb 25, 2020 2:54 pm

Re: Connecting over the internet

Post by trendy »

Are you connecting the Pi on a different network and you get the connection refusal, or is it connected to the same network and you are trying to connect from the internet?
Calado
Posts: 10
Joined: Wed Feb 21, 2018 6:02 pm

Re: Connecting over the internet

Post by Calado »

Hi,

The Pi is always connected to the same network. Any device outside the network is rejected, even if that device is connecting inside the network. The issue happens with or without ddns and fail2ban.
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: Connecting over the internet

Post by Joulinar »

Honestly, I would not recommend to open ports like SSH towards the internet. If this is needed I would recommend to go with a VPN solution.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Calado
Posts: 10
Joined: Wed Feb 21, 2018 6:02 pm

Re: Connecting over the internet

Post by Calado »

I mention ssh as part of the software that doesn't work. I need FTP (or something like it) to access and backup data while I'm away.

Cheers
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: Connecting over the internet

Post by Joulinar »

go with a VPN solution and SAMBA or FTP.

FTP is not built to be secure. It is generally considered to be an insecure protocol because it relies on clear-text usernames and passwords for authentication and does not use encryption. Data sent via FTP is vulnerable to sniffing, spoofing, and brute force attacks, among other basic attack methods.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Calado
Posts: 10
Joined: Wed Feb 21, 2018 6:02 pm

Re: Connecting over the internet

Post by Calado »

Hi Joulinar,

You're missing the question. I understand my options, but I can only connect to them while connected to my network. Once I disconnect from my network and start working on 4G or any other network, I can't access any file sharing service. Ports are open, the services are running, I can even connect to a few of them over the internet (E.g. Webmin), but FTP, SMB and such always return "Error 1005 Refused Connection".
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: Connecting over the internet

Post by Joulinar »

did you setup a firewall like iptables on your system?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Calado
Posts: 10
Joined: Wed Feb 21, 2018 6:02 pm

Re: Connecting over the internet

Post by Calado »

Unless it was installed as a dependency, I see no evidence of it.
User avatar
Joulinar
Posts: 2287
Joined: Sat Nov 16, 2019 12:49 am

Re: Connecting over the internet

Post by Joulinar »

can you check iptables -L -n if there is anything setup. Next to this, I know there are internet router on the marke who block access on SMB as well as FTP port for security reasons, even if you try to forward.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply