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

DNS Forwarder over IPSEC VPN

I have a remote site I connect to from home via an IPSEC tunnel that's working fine when I use IPs instead of hostnames.  I have added a Request Routing entry pointing the remote DNS domain name to the IP address of the DNS server on the remote network.  From my local network, I can run "host www.remote.lan RemoteDnsServerIP" and get the proper response.  When I try the same pointing to the local UTM machine, it fails.  Doing the same with hostnames on the local network and names of Internet hosts both work fine.  This feels like the IP address that the local DNS server (on the UTM machine) is using isn't on the internal network and isn't getting through the tunnel.  

How do I begin troubleshooting this? I'm new to Sophos/Astaro so be gentle pls.


This thread was automatically locked due to age.
  • Hi,

    Request Routing requires that the UTM's DNS server be able to contact the DNS server pointed to.

    The UTM itself does not normally traverse VPNs; I'm not certain if there's a workable solution there.

    However, if the IP for 'www.remote.lan' is unlikely to change, you could use a static DNS entry in the UTM instead.

    Barry
  • Pity.  Sure would be sweet to be able to have the DNS server bind to the internal network and source forwarded requests through that interface.  I've been able to make this work with M0n0wall and Untangle before.  Disappointed.
  • Hi, Paul, and welcome to the User BB!

    I can't "see" what you're describing.  What command did you run when you said, "When I try the same pointing to the local UTM machine, it fails?"  Also, please [Go Advanced] below and attach a picture of your Request Route open in Edit mode with the 'Target server' Host definition open in Edit mode with the 'Advanced' section visible.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Thanks Bob.  I have an IPSEC tunnel from my home network to my office.  I have an entry under Network Services -> DNS -> Request Routing that points to the IP address of my AD server at work for the forward and reverse DNS zones.  The logical network goes something like so:

      [laptop] -- {home lan} -- [UTM] --IPSEC-- [WORK] -- {work lan} -- [AD]

    From a machine on the internal network at home, I can ping IP addresses at the office so the tunnel is up.  I cannot ping those same IP addresses from the UTM machine itself.  I was surprised to learn the IPSEC implementation isn't able to source traffic destined from the UTM itself using the IP on the internal LAN to traverse the tunnel.  I wonder if some static route entries are in order but I've not thought that one all the way through yet.

    Similarly, I can resolve DNS hostnames in the domain at the office from my laptop pointing directly to the DNS server (the AD machine) at the office.  i.e. "host www.work.lan 10.0.0.10" where the AD machine is 10.0.0.10.  However, if I try the same lookup using the IP address of the UTM's interface on the home LAN, it doesn't work.  This is not unexpected given the previous paragraph.

    Is there a trick to get the UTM to use the tunnel and it's local IP as the source for traffic destined for the remote subnet?
  • Hi, 
    You could try adding the LAN ADDRESS to the VPN 'Local Networks' (and remote networks on the other end of the VPN).

    Make a backup first.

    Barry
  • Is there a trick to get the UTM to use the tunnel and it's local IP as the source for traffic destined for the remote subnet? 

    What do you mean by "local IP" in this question?  Are you asking this question to try to better understand what might be happening?

    We still need to see that picture as I described in my previous post.

    I think you need more configuration, but I don't understand what's not happening.  I have a UTM instance in AWS connected via IPsec Site-to-Site to a UTM at our office.  From the 'Tools' menu in WebAdmin of the AWS instance, I can successfully ping bobdesktop.domain.local, and name resolution for that FQDN is provided only by the internal DNS server in the office.  Can you ping via FQDN from WebAdmin to a device in your office?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Bob,

    I believe this is what's going on:
    For the DNS request routing, the DNS server in the UTM needs to be able to talk to the routed DNS server.

    Since he's trying to use a DNS server on the other end of the VPN, and the UTM's local addresses are not normally in the Local Networks, the UTM cannot connect to the remote DNS server.

    I'm not certain what the best fix is.

    Barry
  • My home subnet is 10.10.0.0/24 with the UTM on .1.  My office is 10.10.1.0/24.  The IPSEC tunnel is connecting the two 24-bit subnets on either end.  Therefore the UTM does have an interface on the local end of the tunnel.  Still, when I SSH into the UTM and ping 10.10.1.30, the DNS server at the office, I get no response.  As Barry suggests, the UTM is apparently not using the tunnel for its own traffice.  The DNS forwarder is a secondary result of this.

    So the question becomes, is there a way for the UTM to use the tunnel for its own traffic addressed to the remote subnet when it has an interface on the tunnel's local subnet.  I wonder about a routing entry that points to the local interface for traffic destined for the remote network but I'm not sure how that'd work given the way this IPSEC doesn't present as interfaces and routing entries if its own.  I'm not familiar with the internals of this IPSEC implementation enough to do more than scratch my head here.

    My current solution is to just spin up a caching dns forwarder on a VM here at the house and point UTM to it for the remote zones instead.  Less that ideal but viable.  Messy.
  • I should add that according to the lsof command on the UTM, named is only bound to the localhost and WAN interfaces.  Even if I could ping through the tunnel, the bind config would need to change for the DMS server to be able to use that route.
  • Sorry, it works for me, but, as a visual-tactile learner, I can't see what you're not doing without pictures.  Any luck with Barry's suggestion?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA