Peter <occassionally-(E-Mail Removed)> considered Tue, 29 Nov
2011 23:02:28 +0000 the perfect time to write:
>Take the case of a typical ADSL modem+router, doing NAT for the
>internal LAN, and you get a little extra subnet of IPs from the ISP
>and bring that subnet through the router to the internal LAN, where a
>web server is set up to respond to one of the extra IPs.
You don't need to get any additional IPs - just make sure your IP is
fixed rather than dynamic.
Then you set your router up to forward port 80 traffic to 192.168.n.n
- being the internal address of the webserver, port 25 traffic to the
address of your mailserver, and so on for any other servers you have.
Most routers support port forwarding, and most give a choice between
doing it port by port (good, because any unassigned traffic gets
blocked) or by setting a "default forwarding address" for any incoming
traffic (which is less sensible, as it exposes all ports on the
nominated server to the internet).
More risky than completely hiding the servers from the internal lan in
their own dmz, but less risky than giving them public IP addresses and
completely exposing all their ports on the internet.
>
>There is no DMZ - this is all done with just one router e.g. one of
>the better Drayteks.
>
>So the internal LAN has some machines on 192.168.1.x, and the server
>will be on a public IP of say 123.124.125.126.
>
>The vulnerability I see in mixing stuff like that is that *all*
>packets arriving on 123.124.125.126 are presented to *all* machines on
>the internal LAN.
>
>In theory, if a machine is not responding to that IP, all should be
>well, but there have been loads of attacks involving malformed IP
>packets.
>
>How much protection does a normal ethernet controller provide? I
>though the controller itself will ignore packets addressed to IPs
>other than its own one - or is this an O/S function?
>
>The router won't provide any protection to the 123.124.125.126 stuff
>because that bypasses NAT, and AFAICS also bypasses the "DOS attack
>protection" which the Drayteks offer.
>
>It would be better if the 192.168.1.x internal LAN was behind another
>NAT router, but you lose a lot of that protection if that 2nd router
>has any open ports, which it will have if you need to support e.g. RDP
>over VPN from the outside. I suppose one could terminate the VPN in
>the *2nd* router, but then you have to open ports in the 1st router...
>
>**Realistically** what is the risk in doing all this with a single
>router?
I certainly wouldn't daisychain NAT. NATted Nat is an abomination.
I'd use a router and a physically separate firewall, with the firewall
being built on a PC with 3 ethernet cards - one for lan, one for
connection to the router (with the router passing the public IP
address through to it), and the third a dmz for servers which may be
reached from either lan or internet. You can configure the dmz using
local addresses (on a different subnet to the lan) and use port
forwarding in the firewall to send everything to the right place.
Or you can have a /29 subnet which gives you 6 IPs to play with, 5 of
which could be for use on the DMZ (you need one for the external
address of the firewall).
You only really need more than one IP address if you want to run more
than one server on the same port, and there aren't many IP addresses
to go around, so I'd recommend the private IP through NAT route.
You may need to run your own DNS server to provide local resolution
for the real addresses of servers in the dmz, or you could do that
with hosts files - it depends on how many PCs you have to look after.
>
>I would have thought that after all these years, WinXP will have been
>well patched against the obvious network attacks using malformed
>packets which are *not* addressed to the machine in question.
>
>And the web server has a unix firewall anyway. Even if you put it
>behind a NAT router, you still have to open port 80, and a few others.
>
>We have seen loads of dictionary attacks over the years, against port
>443 usually. The routers do not have external admin enabled
On anything that can be exposed to that kind of attack, I run 3
strikes and out account locking (the number of strikes can be varied
depending on the security level you want/need and how likely it is for
a legitimate user to be clobbered by a lockout). You can still get in
as root/admin from the local console even if something has locked the
account by trying to break in over the network.
Of course, on a router that may mean breaking out the serial cable and
doing battle with the CLI