This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to: Dmz

Hi 

I am unsure about the function of DMZ on my network. I have set the following set (pf,DNAT,Masquerading)

Private_Lan = 192.168.2.0/24 (IPs assigned via DHCP)
DMZ= 172.16.1.0/24 (IPs assigned via DHCP)

1.DMZ (Network)->Private_Lan (Network)--> Drop and Log
2.DMZ (Network)->Metal zone radio station-->Allow
3. DMZ (Network)->Metal zone radio station port->Metal zone radio station-->Allow
4,5,6,7. Private_Lan (Network)->vpn/DNS-> Allow (rules to allow vpn)
8. Any->utorrent port->utorrent client-->Allow
9,10. Utorrent client->TCP,UDP outgoing connection ports ->any-->Allow
11. Private_Lan (Network)->Any->DMZ ( Network)-->Allow
12.Private_Lan (Network)->IM traffic->Any-->Allow 
13.Private_Lan (Network)->web traffic->Any-->Allow 
14.Private_Lan (Network)->DMZ (Network)-->Allow
15.DMZ (Network)->IM traffic->Any-->Allow 
16.DMZ (Network)->web traffic->Any-->Allow

Masquerading
-----------------
DMZ->Wan interface

DNAT
----------------
Traffic selector:  Any →  utorrent →  WAN Traffic (Address)
Destination translation:  uttorent PC

However there is no masquerading rule wth regards to Private network? Should I set one for Private_Lan-->DMZ? Sorry guys but I am really confused. My impression is that Private_Lan should have access via the DMZ and directly to the internet. DMZ should have access to the internet but no the Private_Lan. Could you please point any errors with regards to the DMZ Zone?

I also get a ICMP redirect host alert from the IPS 
source: 172.16.1.1 (Gateway defined on the DHCP pool for DMZ Zone) and destination: 172.16.1.2 (client is running utorrent).Utorrent works fine at the client with DNAT defined above


This thread was automatically locked due to age.
Parents
  • Are you using the HTTP Proxy?  If so, what networks are allowed to use it?
  • I am using v7.402,HTTPS enabled and I have operational mode :transparent mode (no HTTPS profiles)

    DMZ and Private_Lan are both defined under : HTTP/s, NTP, Intrusion Protection, DNS
  • The HTTP/S proxy handles traffic before Packet Filter rules are considered.  If you don't want devices in the DMZ to be able to use the HTTP/S Proxy to connect to devices in Private_Lan, you need to add the internal domain and //192.168.2 to the block list along with any other names the internal DNS can resolve for the HTTP/S Proxy.  The devices in Private_Lan don't use the proxy for HTTP/S access to other devices inside Private_Lan, so they aren't affected by these blocks.

    Also, since PF rules are processed sequentially, you will want the most-often-used rules at the top, probably starting with DNS.

    What devices in your DMZ are initiating connections with the outside world that would require a masq rule?

    Yes, you should have a masq for Private_Lan->WAN interface.  I suppose you could route traffic through the DMZ, but it seems to me that that just complicates things without providing more security or flexibility.

    Cheers - Bob
  • The HTTP/S proxy handles traffic before Packet Filter rules are considered.  If you don't want devices in the DMZ to be able to use the HTTP/S Proxy to connect to devices in Private_Lan, you need to add the internal domain and //192.168.2 to the block list along with any other names the internal DNS can resolve for the HTTP/S Proxy.  The devices in Private_Lan don't use the proxy for HTTP/S access to other devices inside Private_Lan, so they aren't affected by these blocks.

    Also, since PF rules are processed sequentially, you will want the most-often-used rules at the top, probably starting with DNS.

    What devices in your DMZ are initiating connections with the outside world that would require a masq rule?

    Yes, you should have a masq for Private_Lan->WAN interface.  I suppose you could route traffic through the DMZ, but it seems to me that that just complicates things without providing more security or flexibility.

    Cheers - Bob



    At the moment DMZ has only a utorrent client(initiate TCP/UDP connection for seeding_utorrent) but in the future more hosts will be added (web server etc). thank you for the pf tip. The new pf rules are :


    1.DMZ (Network)->Private_Lan (Network)--> Drop and Log
    2,3,4. Private_Lan (Network)->vpn/DNS-> Allow (rules to allow vpn)
    5. DMZ (Network)->Metal zone radio station port->Metal zone radio station-->Allow
    6.utorrent client->utorrent tracker port->utorrent tracker-->Allow
    7.Any->utorrent port->utorrent client-->Allow
    8,9. Utorrent client->TCP,UDP outgoing connection ports ->any-->Allow
    10. Private_Lan (Network)->Any->DMZ ( Network)-->Allow
    11.DMZ (Network)->PGP ports->PGP Servers-->Allow
    12.Private_Lan (Network)->EMAIL_ports->EMAIL_ISP-->Allow
    13.Private_Lan (Network)->IM traffic->Any-->Allow 
    14.Private_Lan (Network)->web traffic->Any-->Allow 
    15.DMZ (Network)->IM traffic->Any-->Allow 
    16.DMZ (Network)->web traffic->Any-->Allow

    I am just confused as there are almost identical rules for DMZ and Private_Lan. I was under the impression that Private_Lan should traffic via DMZ to the internet and not directly to the internet(obviously I was wrong!).Just to recap:

    I have the pf stated above

    Masquerading
    -----------------
    DMZ->Wan interface
    Private_Lan->Wan interface

    DNAT  ( redirect the external IP address to the utorrent client-DMZ address)
    ----------------
    Traffic selector:  Any →  utorrent →  WAN Traffic (Address)
    Destination translation:  uttorent PC      
     

    DMZ and Private_Lan are included : Intrusion prevention, NTP, DNS, HTTP/S, FTP.
  • I still get strange IPS alerts from the DMZ zone.(Utorrent client on DMZ). I got 50 of the below alerts and about 30 ICMP.

    2009:04:26-21:23:33 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:33 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:34 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:37 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:42 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"


    At the time I got above alert I was remotely searching files on utorrent client via my pc (192.168,2.249)

    /var/log/ips/2009/04/ips-2009-04-25.log.gz:2009:04:25-15:54:00 Astaro barnyard[12745]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="alert" reason="ICMP redirect host" group="420" srcip="172.16.1.1" dstip="172.16.1.2" proto="1" srcport="5" dstport="1" sid="472" class="Potentially Bad Traffic" priority="2" generator="1" msgid="0"


    In addition,all email coming from astaro are treated as SPAM

    2009:04:26-21:24:27 Astaro pop3proxy[31579]: id="1101" severity="info" sys="SecureMail" sub="pop3" name="email quarantined" from="astaro@firewall.net" to="****" subject="[Astaro][CRIT-852] Intrusion Protection Alert (Packet dropped)" size="2629" srcip="86.141.71.223" dstip="62.1.217.180" uid="2211" ident="0/31579-15-1240777467" reason="as" extra="confirmed"
    2009:04:26-21:24:27 Astaro pop3proxy[31579]: id="1101" severity="info" sys="SecureMail" sub="pop3" name="email quarantined" from="astaro@firewall.net" to="***" subject="[Astaro][CRIT-852] Intrusion Protection Alert (Packet dropped)" size="2801" srcip="86.141.71.223" dstip="62.1.217.180" 


    I think that it's probably the way I've set the DMZ that generates these problems.
Reply
  • I still get strange IPS alerts from the DMZ zone.(Utorrent client on DMZ). I got 50 of the below alerts and about 30 ICMP.

    2009:04:26-21:23:33 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:33 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:34 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:37 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"
    2009:04:26-21:23:42 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="drop" reason="NETBIOS SMB server response heap overflow attempt" group="110" srcip="172.16.1.2" dstip="192.168.2.249" proto="6" srcport="445" dstport="21504" sid="13901" class="Attempted User Privilege Gain" priority="1" generator="1" msgid="0"


    At the time I got above alert I was remotely searching files on utorrent client via my pc (192.168,2.249)

    /var/log/ips/2009/04/ips-2009-04-25.log.gz:2009:04:25-15:54:00 Astaro barnyard[12745]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="alert" reason="ICMP redirect host" group="420" srcip="172.16.1.1" dstip="172.16.1.2" proto="1" srcport="5" dstport="1" sid="472" class="Potentially Bad Traffic" priority="2" generator="1" msgid="0"


    In addition,all email coming from astaro are treated as SPAM

    2009:04:26-21:24:27 Astaro pop3proxy[31579]: id="1101" severity="info" sys="SecureMail" sub="pop3" name="email quarantined" from="astaro@firewall.net" to="****" subject="[Astaro][CRIT-852] Intrusion Protection Alert (Packet dropped)" size="2629" srcip="86.141.71.223" dstip="62.1.217.180" uid="2211" ident="0/31579-15-1240777467" reason="as" extra="confirmed"
    2009:04:26-21:24:27 Astaro pop3proxy[31579]: id="1101" severity="info" sys="SecureMail" sub="pop3" name="email quarantined" from="astaro@firewall.net" to="***" subject="[Astaro][CRIT-852] Intrusion Protection Alert (Packet dropped)" size="2801" srcip="86.141.71.223" dstip="62.1.217.180" 


    I think that it's probably the way I've set the DMZ that generates these problems.
Children
  • In the last code box, I'm confused as to why the srcip is in Britain and the dstip is in Greece.
  • In the last code box, I'm confused as to why the srcip is in Britain and the dstip is in Greece.


    That has been the case since I've set up mail in Astaro. I live in the UK but I am using a ***@***.gr pop mail(sent all the Astaro notification email).I've added astaro to the whitelist and I can get the emails as before.

    This morning I got another IPS alert

    4 1448 MISC MS Terminal server request Protocol Anomaly / Misc 2 2.02

    This time the source IP was a client on the Private_Lan zone streaming something from utorrent client on the DMZ Zone

    /var/log/ips.log:2009:04:27-00:29:15 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="alert" reason="MISC MS Terminal server request" group="450" srcip="192.168.2.33" dstip="172.16.1.2" proto="6" srcport="50351" dstport="3389" sid="1448" class="Generic Protocol Command Decode" priority="3" generator="1" msgid="0"
    /var/log/ips.log:2009:04:27-00:31:45 Astaro barnyard[30079]: id="2101" severity="warn" sys="SecureNet" sub="ips" name="Intrusion protection alert" action="alert" reason="MISC MS Terminal server request" group="450" srcip="192.168.2.33" dstip="172.16.1.2" proto="6" srcport="50357" dstport="3389" sid="1448" class="Generic Protocol Command Decode" priority="3" generator="1" msgid="0"


    Basically when I access the utorrent client (either searching a file or viewing a file )I get IPS alerts. I am unable to copy files to/from the utorrent clinet (DMZ)