In this article, we will create a simple NAT firewall with DMZ using iptables.
Besides having a Terminal open, you need to ensure that
iptables is installed in your machine.
We will write a script to set up a DMZ using
iptables. Create a
dmz_iptables.shscript and write the following code in it:
How it works
In the preceding code, we have used
iptables to set up a DMZ. In this script, we are allowing the internal traffic from the internet to the DMZ.