Hey thank you for this comment. I was just following the ArchWiki and you can also find similar directions here. I think the idea is that on a home network, every device can be trusted, but it’s still good to have a firewall in case your ISP’s firewall is crappy. What do you think?
Your isp firewall uses nat, and a hacked isp gateway or some other device that had ports forwarded to it are the most likely things to be reaching into your network. They’ll be on that subnet.
I set up a rule last night to allow SSH access from any device on my subnet, is it a good idea to add a separate rule blocking SSH from my router? I’ve already set up SSH with public key authentication so in theory there aren’t many devices that can access it but the firewall restriction seemed like a good idea
If you are worried that an attacker may have compromised your router and that key auth is not secure enough, then yes it would make sense.
I move ssh to a non-default port, only allow key based auth and install fail2ban. This is enough for me. It protects against automated attacks hitting port 22 and prevents brute force.
I don’t think my router has been compromised and I think it’s pretty unlikely it will be, but the extra rule seems pretty trivial to set up so if there are no downsides I may as well! I have already changed the SSH port and disabled password login. I’ll look into fail2ban, might be worth it if it’s relatively simple to set up!
Hey thank you for this comment. I was just following the ArchWiki and you can also find similar directions here. I think the idea is that on a home network, every device can be trusted, but it’s still good to have a firewall in case your ISP’s firewall is crappy. What do you think?
Your isp firewall uses nat, and a hacked isp gateway or some other device that had ports forwarded to it are the most likely things to be reaching into your network. They’ll be on that subnet.
Ohhh of course. Thank you.
So the more practical solution is just to assign a static IP to all my trusted devices, then allow those IP addresses rather than the whole subnet.
That makes total sense, but why do you think the ArchWiki says otherwise? Do you think they’re just presenting a “just werks” solution?
Yes, they’re giving “very simplistic” and also demonstrating how to deny and add access in multiple ways.
It’s also not uncommon to do things like that. The default firewall config in Fedora is wide open for every port above 1024.
You are a rock star.
Okay, I now have new awesome rules! I assigned my other two machines static IPs (192.168.1.3 and 192.168.1.4, respectively). So now I have:
SSH still works, everything is awesome. Thanks again 👏👏👏
I set up a rule last night to allow SSH access from any device on my subnet, is it a good idea to add a separate rule blocking SSH from my router? I’ve already set up SSH with public key authentication so in theory there aren’t many devices that can access it but the firewall restriction seemed like a good idea
If you are worried that an attacker may have compromised your router and that key auth is not secure enough, then yes it would make sense.
I move ssh to a non-default port, only allow key based auth and install fail2ban. This is enough for me. It protects against automated attacks hitting port 22 and prevents brute force.
I don’t think my router has been compromised and I think it’s pretty unlikely it will be, but the extra rule seems pretty trivial to set up so if there are no downsides I may as well! I have already changed the SSH port and disabled password login. I’ll look into fail2ban, might be worth it if it’s relatively simple to set up!