# ==============================
# DMZ 
#  NETWORK: 23.214.219.128/25
# ==============================
ip=23.214.219.129
routerIp=23.214.219.254
mask25=255.255.255.128

dns=23.214.219.130
mail=23.214.219.134
vpn_gw=23.214.219.133
www=23.214.219.132
smtp=23.214.219.131

dnsPort=53
mailPort=888
vpn_gwPort=443
wwwPort=587
smtpPort=80
sudo yum install iptables-services -y
sudo systemctl stop firewalld
sudo systemctl disable firewalld
sudo systemctl mask firewalld
sudo systemctl enable iptables

sudo iptables -F
sudo ifconfig enp0s8 $ip netmask $mask25
sudo ip route add 192.168.10.0/24 via $routerIp
sudo route add default gw $routerIp
# alias dos ips
sudo ip addr add $dns dev enp0s8
sudo ip addr add $mail dev enp0s8
sudo ip addr add $vpn_gw dev enp0s8
sudo ip addr add $www dev enp0s8
sudo ip addr add $smtp dev enp0s8

# netcart
internalIp=192.168.10.1
nc -l &
nc -v -s $dns    -p $dnsPort        $internalIp
nc -v -s $mail   -p $mailPort       $internalIp
nc -v -s $vpn_gw -p $vpn_gwPort     $internalIp
nc -v -s $smtp   -p $smtpPort       $internalIp
nc -v -s $www    -p $wwwPort        $internalIp
nc -v -s $www    -p $wwwPort        $internalIp
