Comment on Do I really need a firewall for my server?
CompactFlax@discuss.tchncs.de 1 week ago
You have a firewall. It’s in your router, and it is what makes it so that you have to VPN into the server. Otherwise the server would be accessible. NAT is, effectively, a firewall.
Should you add another layer, perhaps an IPS or deny-listing? Maybe it’s a good idea.
non_burglar@lemmy.world 1 week ago
Op means, as they said, a firewall on the server itself.
No it isn’t. Stop giving advice on edge security.
hedgehog@ttrpg.network 1 week ago
Are you saying that NAT isn’t effectively a firewall or that a NAT firewall isn’t effectively a firewall?
non_burglar@lemmy.world 1 week ago
NAT simply maps IPS across subnet boundaries in such a way that upstream routing tables don’t need updating.
If you use destination NAT forward rules to facilitate specific destination port access, you are using a firewall.
CompactFlax@discuss.tchncs.de 1 week ago
What sort of isp supplied residential equipment doesn’t block inbound connections? Pedantically, you’re correct.
possiblylinux127@lemmy.zip 1 week ago
How is NAT not a firewall? Sure theoretically it isn’t but I’ve yet to see a implementation of a port mapped NAT that doesn’t act as a Firewall
non_burglar@lemmy.world 1 week ago
Because NAT acts as a firewall with a “default deny” policy for incoming packets, but no other rules. You cannot prevent a device on the private subnet side of a NAT from attempting to communicate with an “outside” ip with nat alone, nat doesnt understand the concepts of accept/deny/drop.
All nat does is rewrite address headers.
The machines behind a NAT box are not directly addressable because they have private IP addresses. Machines out on the general Internet cannot send IP packets to them directly. Instead, any packets will be sent to the address of the NAT box, and the NAT box looks at its records to see which outgoing packet an incoming packet is in reply to, to decide which internal address the packet should be forwarded to. If the packet is not in reply to an outgoing packet, there’s no matching record, and the NAT box discards the packet.
It’s a confused topic because for a lot of people, nat does essentially everything they want. As soon as you get into more complex networking where a routing table needs to be updated, or bidirectional fw rules, it becomes apparent why routing + fw + nat is the most common combo.