I have a home 25.10.8 - Goldeye setup that is running great. To create offsite backups, I have set up a second system for pull replications. I have created SSH backup credentials, added a pull replication over the SSH (no Netcat) and everything works with both systems on my home LAN. It even works when I specify the SSH host address as my WAN address, with my router port forwarding to the source TrueNAS.
However, when I move the backup system out of my home LAN, I get a “Network unreachable” error when trying to connect to the source at home. The strange thing is that I can SSH connect to the home system from a computer in the remote network, using Putty.
Given that Putty works, it seems to me that something in the TrueNAS(s) is causing the problem. I would appreciate any troubleshooting help. So near, but so far!
Putty only proves that the remote PC can reach the WAN endpoint; the backup NAS may have a different default route, DNS result, or IPv4/IPv6 choice. I’d test the exact address and SSH port from the backup NAS itself and check its gateway and the router’s forwarding and allow-list, not just the PC. Keep SSH restricted to the backup site’s address, or use a VPN, then run a restore test from the offsite copy.
The old adage was right! When I moved the backup offsite, it retained the DNS and gateway settings from my home network. Once updated with the new LAN settings, it works.
Recap: Offsite TrueNAS SSH credentials have my home WAN IPv4 address as the host, with a non-standard (not 22) port. My home router forwards this port to my home TrueNAS, with its SSH service set to the same port.
Try using tailscale app install on TrueNAS Scale. You avoid opening unnecessary ports on the firewall and create a secure connection between clients using Wireguard VPN. Tailscale in general becomes a handy tool in general for other clients on your mesh as well.
As a general rule for computers and servers, not specific to TrueNAS, you should never, ever, open up and port forward 22 on a firewall. You also shouldn’t do ssh over the internet like this, even over non-standard ports.
I think your concern is overblown. I have turned off SSH password login, and the router port forwarding source and destination addresses are limited to my two TrueNAS locations. So I think that hacking into my home server via this vector is well nigh impossible. But I am not an expert and I welcome an explanation why this, and SSH over the internet, is risky.
Nevertheless, I going to try @Glitch01’s suggestion of Tailscale. Although it seems to me that this just introduces another attack surface. Results later.
One threat I can think of, is that if someone nefarious were to gain access to my remote server, they could see and use my SSH login credentials to mess with the home system? But does this still apply if I use Tailscale? Again, comments welcome, and thanks.
Yes, that risk is real, and Tailscale doesn’t change it. If the offsite box holds a key that can log into the home box, whoever gets into the offsite box gets that access. Safest is to flip it so the offsite box pulls, and the home box never holds a credential for it. If you have to push, use a dedicated user with a key limited to zfs receive on one dataset, and keep snapshot retention on the offsite side so nobody can wipe the history.
I genuinely appreciate your general viewpoint here. Things are different now, AI agents basically wild on the internet are a real thing. Maybe you don’t care because it’s just your house. Some people’s risks are alot higher. The news has been on fire about AI agents and cyber warfare for the past few weeks. Maybe that’s overblown, or maybe it’s even worse. You just don’t know.
In SSH more specifically, it’s been bad practice to enable ssh over the internet for longer than I’ve been in the field. You own your risks is all I am telling you.
An open port on your firewall is always a risk especially for zero day vulnerabilities or for misconfigured known services. You’d be surprised at how often port scans are done if you have devices that can detect these scans and sources. Of course opening a port is not an end all as there are certs and traffic rules you can apply to deny access by default with exceptions.
Tailscale uses existing ports 80/443 to establish VPN connections and has security based rules that is deny by default when you remove the “all exceptions” rule. You don’t have to fiddle with firewalls rules at all and can grant access to a multitude of devices or even family/friends with their own restrictions and policies. There are a multitude of layers of safeguards you can add with tailscale to make your vpn mesh safe.
I have now installed Tailscale on both boxes and established replication using it, with the help of some Yourtube videos, especially Tom Lawrence. Port forwarding on my router is disabled.
I need to educate myself more on Tailscale to understand exactly what is going on, and its other potential uses. I have been using Nginx, Wireguard, Rustdesk and maybe Tailscale can replace some of these.
Tell that to AWS. Or DigitalOcean. Are basically any other cloud provider. Opening SSHD without pasword auth is an industry standard.
To assume that Tailscale is more secure than sshd is… let’s say bold?
Anyway, opening port 22 on a a firewall is totally fine. If you it to make even more secure, make use of nftables and the likes. If your ISP it not totally braindead, you will get a static /48 or /56 IPv6 Prefix. So the rule could be something like “Allow incoming from static /48 on port 22” and than use Wireguard or Tailscale in case you are on the road.
Listen, I can honestly tell you that I have personally overseen hardware which was secured in exactly this same manner over the internet, firewalled, non standard ports and good ssh keys. It is certainly a deployment model that exists. But that doesn’t make it right or the best option.
You are literally exposing the largest possible attack surface, shell access, and you are exposing it on the internet. I am well aware of the fact that ssh’s security model is a good one, its certainly not Telnet. But its attack surface is the same as Telnet.
In a world where we should be more cognizant than ever of our security posture, why on earth would anyone choose willingly to directly expose shell access over an untrusted network as scary as the internet in 2026? Security is about layers. Lets add some.
This is not a new idea. Why do you think IPSEC exists in the first place? I was still in elementary school when this was written. Even if sys admins controlled the networks at both ends, its data still crossed a public network between them. Encryption and cryptographic keys only solve part of this problem.
I am following the interesting discussion about exposing SSH, versus running it over Tailscale. Valid points on both sides, I think.
However… are we not forgetting the original issue here? I am setting up a pull replication on a remote TrueNAS system, which requires SSH to the source. Maybe the real problem is that SSH requirement? Should there be a different way to replicate that does not use SSH?
As always, these are just my own personal thoughts and opinions,
TrueNAS solves the problem of replication under the assumption that the two devices are in the same private network. It was never designed to solve the problem of replication between two devices connected only on the internet. VPNs solve this problem, either locally on the NAS like you are doing, or at the firewall like I would argue is the best option. This hold particularly true for real production non-homelab usecases, and is also how I’d previously fixed the systems I’d managed that had the SSH-over-the-internet approach.
Anything more than that would be a feature request. I’d still argue, even if such a feature as SSH-less replication were requested/considered/added, that the VPN layer is still a valid requirement for best practices over the internet. It means you have two doors to break down, instead of only one.
By that logic, lets us take a look at OpenVPN. You are literally exposing the largest possible attack surface, shell access, RDP access, heck every access to a whole subnet!
Because it is extremly secure and easy. That is why everyone does it.
You base that on what? I could even argue the opposite is true. If that was really the case, why bother with encryption? Why enable it by default, if it is only intended for local networks?
Again, sshd with password auth disabled and root login disabled is perfectly fine. Every single VPS provider does it that way.
If you want an additional layer, fine.
If your ISP it not totally braindead, you will get a static /48 or /56 IPv6 Prefix. So the rule could be something like “Allow incoming from static /48 on port 22 with destination truenas” on your firewall or with probably nftables on TrueNAS.
Sure. But that is why firewall rules exist, and why DMZs exist. You should terminate tunnels to the firewall, in their own seperate network. Terminating VPN traffic in its own firewall zone is the correct answer. Layers, like an onion.
or tiramisu
Just because “The Cloud” exists doesn’t mean we should throw away decades of network design and security best practices.
Again, I was 4 years old when this was written. These are not new ideas.
The network inhabited by the gateway
is often called the demilitarized zone (DMZ). A gateway in
the DMZ is sometimes assisted by an internal gateway.
Typically, the two gateways will have more
open communication through the inside filter than
the outside gateway has to other internal hosts. Either
filter, or for that matter the gateway itself, may be omit
ted; the details will vary from firewall to firewall. In
general, the outside filter can be used to protect the
gateway from attack, while the inside filter is used to guard
against the consequences of a compromised
gateway. Either or both filters can protect the
internal network from assaults. An exposed gateway
machine is often called a bastion host.
“Everyone”? Just because you have allowed Cloud architecture and propogranda to alter your perspective doesn’t mean that “everyone” is doing it.
In my homelab, I have had hosts in Linode. I have also had Servers in CoLos. I have never enabled raw SSH over the internet as part of those deployments. Your “everyone” argument is now dead.
Again, these are not new ideas. Zero Trust. Even your local networks should be considered hostile to whatever degree you as the person responsible deems necessary for your own risk profile.
As always, just my opinion. But I believe I have history and the lessons of much smarter people than us on my side of this argument. Do whatever you want in your home network. I’m not trying to stop you. I’m trying to help stop bad advise from polluting public discourse as it relates to people who’s risk profiles are alot larger than some home movies.