A demilitarized zone or DMZ allows your servers to respond to public IP addresses. The difference between placing a server in a DMZ (orange) and placing directly on the public (red) network is that you can limit traffic into and out of the server. And you use the firewall to limit access so unwanted traffic never gets to your servers. You can use the built-in QOS to limit the amount of traffic overall for all machines; important where you pay for bandwidth.
Check if the IPFire Network Configuration Type included an ORANGE network. Grab ORANGE network info:
[root@ipfire ~]# ifconfig orange0 | grep 'inet' | sed 's/^[ \t]*//'
inet 10.8.6.1 netmask 255.255.255.0 broadcast 0.0.0.0
If you get the error orange0: error fetching interface information: Device not found
, return to setup and add the ORANGE network, or setup a virtual bridge as indicated below.
The inet addr is the DMZ router address. And the Mask is the subnet mask for the DMZ network.
Access the web server and setup the Network similar to the table below.
Note: Below are examples for this article. Please set your web server addresses as you see fit.
Description | Address | Note |
---|---|---|
IP address | 10.8.6.5 | Example web server |
Subnet mask | 255.255.255.240 | Mask from ifconfig above (allows fourteen IP addresses in the DMZ) |
Router address | 10.8.6.1 | IP address (inet addr) from ifconfig above |
DNS server | 9.9.9.9 | External DNS server. Don't use IPFire box DNS server. |
There is one firewall rule needed for the DMZ network. This firewall rule will use NAT to translate the external IP address to the firewall IP address allowing the internal DMZ (orange) server to respond.
To create the rule go to menu Firewall > Firewall Rules and click New rule:
To access the DMZ web server:
http://10.8.6.5 # access orange via green or blue
-or-
http://81.3.27.38 # access via Internet using Internet IP address
-or-
http://myDDNShostname.org # access via Internet using Dynamic DNS hostname
I see 100 to 200 attempts to access port 80 everyday. So I wanted to hide my web server behind port 8180. This DOES NOT make things more secure. It just hides them a little. Secure by obscurity does not work!
To edit the rule go to menu Firewall > Firewall Rules and click the Edit pencil. Then go to:
To access the DMZ web server:
http://10.8.6.5 # access orange via green or blue
-or-
http://81.3.27.38:8180 # access via Internet using Internet IP address
-or-
http://myDDNShostname.org:8180 # access via Internet using Dynamic DNS hostname
Done!
Older Revisions • May 28 at 10:16 pm • Jon