K, I'll try. This is good practice for me, since I'm studying this stuff, I need to be able to express it clearly without the technobabble too...
Basically a firewall (a hardware firewall, that is, with multiple network ports, not the software firewall in the OS) lets you define exactly what sort of network traffic to allow, to and from where, filtering both by the physical network port, and by the IP addresses of the messages. Good ones will usually also let you define certain sorts of traffic that will be logged, or generate alarms sent to your e-mail address or whatever.
So, a basic firewall setup looks like this:
Internet --------- Firewall --------- Internal Network
And you'd have rules that allow only for outgoing traffic like:
- allow http requests from the internal network to the internet
- allow e-mail requests from the internal network to the internet
- deny everything else
In practice, a lot of people just allow all outgoing traffic - that's not actually such a good idea, but not really relevant here.
Ideally, for best security, you shouldn't be running any servers - if you do, there's a chance the server will be hacked, since it provides a way of remotely accessing the computer. If the server is hacked, the attacker could not only get information directly from the server, but also use it as a launching point for attacks against your private computers.
If you are going to run servers, you have to keep that in mind. So, not only do you need to defend your private computers and your public servers from the internet, but you also have to be ready to defend your private computers from your public servers. So, if you put your servers on a separate network (i.e. to communicate with the internal computers, the DMZ - server network - has to cross the firewall from one network interface to another), the firewall can restrict that traffic too.
Code:
Internet --------- Firewall --------- Internal Network
|
|
DMZ
Now you can add another rule or two:
- deny any requests from the DMZ to the internal network, and raise an alarm if they happen.
- deny any requests from the DMZ to the internet, and raise an alarm if they happen
Cause servers have no business making outward connections, so if it happens you know something's up