Guest User!

You are not Sophos Staff.

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

DMZ built of combination of MASQUERADE and/or FullNAT and/or DNAT???

I spent many many hours during the last few weeks , trying about everything I found in here in order to have a FULL DMZ using 1 free interface,

I works, kinda,  but not completely, there's always something that goes wrong.

I also tried this:
UTM: Accessing Internal or DMZ servers from Internal Networks using DNAT

in any way I could understand it...
doesn't work

I can say that it's not completely DMZed because , when I remove the UTM from the connection and put the cable directly into the PC, or use USB tethering from my phone I can properly achieve what I'm trying to do...
also 
when having a look at the live-log I can see that there are white lines, 
concerning the PC, who is alone on the interface, wich is on a different subnet, so I can't be mistaken , in theory there should be red and green lines right?


Please , please , please,  HOW can I DMZ  1 interface, there has to be someone who knows the recipe ?


This thread was automatically locked due to age.
  • When you try to connect with the UTM in place does the vpn fail to connect or you can connect just not browse? It would be helpful to see logs from the firewall, ips, web filtering as there should be a clue there if the UTM is dropping or not allowing the traffic out.

    What port are you using for Openvpn? Do you have https scanning enabled as it could interfere with traffic on port 443.

    I would suggest you may have too many variables in play with your current UTM configuration. In order to troubleshoot better I would start with a fresh configuration with minimal rules to allow access. Test that it is working and then add/enable features such as IPS, web filtering etc. 

    A NAT masq rule and a firewall to allow Internal Network -> any -> Internet should be all that's necessary for basic functionality.
  • When you try to connect with the UTM in place does the vpn fail to connect or you can connect just not browse?


    probelm =browse only , the OpenVPN client claims to be successfully connected.

     It would be helpful to see logs from the firewall, ips, web filtering as there should be a clue there if the UTM is dropping or not allowing the traffic out.


    I attached the requested logs, I did cleared them before connecting OpenVPn, and trying to browse .
    IPS is empty, probably because it's OFF
    http.log ( pasted because of the 5 upload files limit)
    see below

    and I did cleaned the firewall.log keeping the entries concerning the OpenVPN-connecting-Linux-PC( pasted because of the 5 upload files limit)
    see below


    What port are you using for Openvpn? 

    I did asked this to the VPN-service-provider back in january:
    UDP: 9201, 1194, 8080, 53
    TCP: 443, 110, 80


    Do you have https scanning enabled as it could interfere with traffic on port 443.


    I don't know where in the UTM that is...


    A NAT masq rule and a firewall to allow Internal Network -> any -> Internet should be all that's necessary for basic functionality.


    That's what I did , following your recommendations from an earlier post in this very thread
    Since this PC is alone on it's interface ( named DMZ) then it's easy for me to disconnect all the others on other interfaces, by removing the ethernet cables thus removing the traffic , and noise in the logs...

    the way I see it , the thing is that the DNS requests formulated by the PC(=192.168.14.204) after being connected to the OpenVPN-server, are addressed to the UTM's internal-interface(named DMZ=192.168.14.102), instead of being sent inside the tunnel to the OpenVPN-server, but since all the PC's traffic is redirected inside the tunnel with local IP as the destination IP for DNS request, so thoses packets get on the other side of the tunnel for an IP which is local on my side of the tunnel ...( see attached screenshots  of interface + dhcp etc..)

    but why does it works perfectly using a Tomato-router while being DHCP also, is it because the DHCP server on DMZ interface has it'S own IP address for Primary DNS , instead of being the Tunnel's DNS, ???( see attached screenshots  of interface + dhcp etc..)

    http.log
    **********
    2014:04:07-22:43:04 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="confd_config_reload_func" file="confd-client.c" line="706" message="reloading config"
    2014:04:07-22:43:05 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="parse_address" file="util.c" line="581" message="getaddrinfo: passthrough6.fw-notify.net: Name or service not known"
    2014:04:07-22:43:05 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="confd_config_filter" file="confd-client.c" line="2818" message="failed to resolve passthrough6.fw-notify.net, using 2a01:198:200:680::8080"
    2014:04:07-22:43:06 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="confd_config_reload_func" file="confd-client.c" line="748" message="reloading config done, new version 6670"
    2014:04:07-22:43:08 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="epoll_loop" file="epoll.c" line="868" message="starting exit cleanup"
    2014:04:07-22:43:08 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="scan_exit" file="scanner.c" line="569" message="scanner subsystem shutting down"
    2014:04:07-22:43:12 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="scan_exit" file="scanner.c" line="575" message="scanner subsystem shut down"
    2014:04:07-22:43:12 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="epoll_exit" file="epoll.c" line="689" message="epoll subsystem shutting down"
    2014:04:07-22:43:12 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="epoll_exit" file="epoll.c" line="704" message="epoll subsystem shut down"
    2014:04:07-22:43:12 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="disk_cache_exit" file="diskcache.c" line="44" message="writing cache index"
    2014:04:07-22:43:12 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="disk_cache_exit" file="diskcache.c" line="46" message="writing cache index done"
    2014:04:07-22:43:12 steliebeach httpproxy[19344]: id="0003" severity="info" sys="SecureWeb" sub="http" request="(nil)" function="main" file="httpproxy.c" line="359" message="shutdown finished, exiting"
    ***************
    packetfilter.log
    *************
    2014:04:07-22:40:55 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="23159" dstport="53" 

    2014:04:07-22:41:22 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="15527" dstport="53" 

    2014:04:07-22:41:23 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="32762" dstport="53" 

    2014:04:07-22:41:33 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="11585" dstport="53" 

    2014:04:07-22:41:52 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="13088" dstport="53" 

    2014:04:07-22:41:53 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="31529" dstport="53" 

    2014:04:07-22:41:57 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="29133" dstport="53" 

    2014:04:07-22:42:51 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="6253" dstport="53" 

    2014:04:07-22:42:52 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="49907" dstport="53" 

    2014:04:07-22:43:17 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="44417" dstport="53" 

    2014:04:07-22:43:38 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="12849" dstport="53" 

    2014:04:07-22:43:52 steliebeach ulogd[4296]: id="2014" severity="info" sys="SecureNet" sub="packetfilter" name="DNS request" action="DNS request" fwrule="60011" initf="eth2" srcmac="0:1b:38:78:28:5e" dstmac="0:14[:D]1:25[:D]:e0" srcip="192.168.14.204" dstip="192.168.14.102" proto="17" length="62" tos="0x00" prec="0x00" ttl="64" srcport="35826" dstport="53" 
    ****************
  • I don't see anything besides the DNS requests in the firewall log, you could check the DNS log as well.

    If you think it is a DNS issue I guess you need to compare what is different when you have the tomato router in place. On the UTM you are using the DNS proxy, but on the tomato what is the client getting assigned for DNS? Have you tried either changing DHCP or manually assigning a public DNS server such as google, opendns or ISP's dns?

    When you connect on the VPN what IP address are you assigned, is it in the 192.168.14.x network?
  • OK some progress!

    Well turns out I couldn't reproduce the difference I wrote about UTM vs Tomato,

    So I got tired of all this, and I did installed their( the VPN paid service) pre-pacaked thing for Windows, and did put it on a windows machine.
    and it worked on the first attempt, WITHOUT being on the DMZed network...
    so 
    I had a look at the openvpn.ovpn file and 
    turns out what the instructions provided we're OFF a little,
    so edited the ovpn file on my Linux PC,
    and tried from the DMZed network, still no go!
    then I found a post about some guy who claims to hate ubuntu every 10 lines or so...
    and he mentionned that the newer version of the GUI provided with ubuntu wasn't working to connect openvpn, 
    but the CLI was just fine
    so went back to my Linux PC and tried by the CLI and it worked on first attempt, so

    all this work & time just because of a faulty GUI....
    I still have to try the Linux PC on my main (non DMZed ) network but since my Android, and the WindowsVM I tried, are connecting WITHout any additionnal NAT and Firewall rules, I think it will be fine , 
    if not,
    I'll come back in this very topic to post something
    well, in fact I'll come back anyway to post something,
    so please wait until I do come back before closing it.

    Thanks
  • So, 
    for thoses interested, if any,
    the basics proclaimed by the gurus here are still true, 
    all that is needed to have a Internal device , connect it's openvpn client software to an external OpenVPN-server, 
    are:
    firewall+NAT rules, 
    better yet, no need for DMZing anything,

    I can even do it from my main internal network, 
    without ANY supplemental rules, 
    (the ones created at the UTM install , by the wizard, are enough, )
    that is 
    IF the OpenVPN server uses FQDN names for its peers, 
    AND IF the OpenVPN server does not mess with DNS
    AND IF the OpenVPN server uses standard ports( because they are already covered by the basic rulescreated by the wizard mentionned above)

    If 1 of the above is missing, 

    to get around FQDN, let's say all they got are IPs, 
    firewall+NAT rules are to be added for the IPs of the peers

    to get around the DNS mess, I did not found a way around that( I subscribed to 2 different services 1=good, 1=bad)

    to get around the non-standard ports, well get ready to forward a plethor of ports, and pray that only that particular device needs thoses...( the good one stayed on standard ports by default so again 1=good, 1=bad)

    finally I think you better forget about using ubuntu's GUI for VPN connecting, because, it doesn't work

    thanks to all of you who  did respond to my posts.

    I'll be back with the next topic, and that is site-to-site topology
  •  

    dilandau said:
    Yes, the Internet object is the same as ANY but is bound to the Interface with the Default gateway. So it only always traffic that traverses the External Interface.

     

    What if there are 2 external interfaces, and the one designated as the default gateway is NOT the one the traffic sould go through,

    how the firewall rule should be then?

    It cannot be AnyIPv4, it cannot be InternetIPv4, what should it be ? 

    External(Address) or External(Network) or ???

    Thanks.

  • The Traffic Selector would be 'Internal (Network) -> {Services?} -> Any' for a WAN connection without a default gateway.

    Back before we had Uplink Balancing with Multipath rules, we had to use Policy Routes to get traffic to go out a second WAN interface.  I would give your second WAN connection a default gateway and use Multipath rules to select which traffic should go through which connection.  This would make your existing WAN-1 firewall rules also work for WAN-2.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Share Feedback
×

Submitted a Tech Support Case lately from the Support Portal?