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

PAC file help

I'm in need of some help with the proxy settings.

I'm running the UTM in transparent with AD SSO and no SSL scanning.

I want to setup standard mode with AD SSO so I can fully decrypt and scan SSL.

If I create a pac file and paste it into the auto config settings on the UTM and tick auto configuration, I'm deploying the browser settings to users via GPO registry. What settings should I have?

My UTM is in internal DNS as utm.domain.com IP 10.0.0.254.  In the pac file does it need to be 10.0.0.254:8080 or can I use Utm.domain.com:8080?  Likewise In the browser auto url does it have to be Http://10.0.0.254:8080/wpad.dat or can this be dns host name?

I've played around with different combinations but wondered what the correct way should be.

If a user doesn't have any proxy browser settings it just lets them out to any site, I basically want them to go through the web protection proxy and if they can't don't allow them to the internet, however if they aren't on the corporate network then I would  allow them to go direct to the internet.

There are so many kbs on how to configure it and how to distribute it's confusing!


This thread was automatically locked due to age.
  • OK, but, in that case, the browsers already have the Proxy settings, so they're not sending port-80 traffic anyway. Or am I not understanding what you're doing with WPAD?

    Cheers - Bob
  • You have missunderstood that. The Proxy Settings are defined in the Proxy.pac script, that is placed on the utm under "Proxy Auto Configuration".

    The browser just has autoconfiguration marked. No Proxy settings.

    The WPAD DNS entry is just a pointer that points to the location of the script.

    If the Client can resolve wpad.domain.tld, the browser connects to the defined IP address on port 80. Then the UTM forwards the request to port 8080.

    Additional, you can configure a dhcp Option for wpad. But this is optional.

    If the Client can't resolve wpad.domain.tld, the Client request goes directly to the destination over his default gateway. 

    For Example, this happens when the Client is on the road or at another location where no WPAD Entry is defined.

    You could also define a Proxy.pac URL in the browser. But this method is static.

    regards
    mod
  • So, I'm still confused, mod.  There is no functional difference between manually configuring Proxy Settings, configuring them with a GPO or configuring them with WPAD (either via DHCP or DNS).  Once the Proxy is configured by one of those means, the browser sends all traffic via 8080 to the Proxy (preferably to its FQDN).  The 80-to-8080 DNAT on the Internal interface doesn't come into play.  I still don't see what problem the DNAT solves.

    Cheers - Bob
  • Sorry Bob, but there is a difference between Manual or GPO configuration and WPAD configuration. 

    With WPAD the first request goes to port 80 not to port 8080. You can't define the port in dns. In the script is defined what is going to the Proxy and what is going directly to the Destination.

    Without this NAT Rule, the first request will be blocked.

    Please try it out.

    regards
    mod
  • Without this NAT Rule, the first request will be blocked.

    Ah ha!  Is it blocked with a profile in Transparent mode?  I've never had a configuration without a Transparent mode profile to catch those that didn't qualify for the other profiles in Standard mode.

    I'd appreciate it if you'd click on my name beside the Cyrano avatar and send me an email mentioning "Configure HTTP Proxy for a Network of Guests" so that you can comment on it.  Though you don't need it, I'll send along the translation that member hallowach did when we updated this two years ago.

    Cheers - Bob
  • Yes, this is also blocked with a profile in transparent mode. At the moment I've not enough time to explain it.

    I'll try it later.

    regards
    mod
  • I've never seen that blocked, but I've never had DirectAccess configured.  Is this a workaround for Unable to resolve host name when you setup DirectAccess on a Windows Server 2012 R2-based computer in an IPv4-only environment?

    Cheers - Bob
  • OK, I'll try to explain it.

    First, you've never seen that blocked because I think, you've never configured WPAD in DNS [;)]

    1.
    Example with WPAD entry in DNS and NAT Rule off. Proxy Profil is in transparent mode. First start Internet Explorer:
    20:39:42 	Default DROP 	TCP 	  	
    
    192.168.24.60  :  2563
    → 
    192.168.24.1  :  80
      
    [SYN]  len=52  ttl=128  tos=0x00  srcmac=84:3a:4b:a1:c6:a3  dstmac=0:1a:8c:f0:4b:a1
    20:39:43  Default DROP  TCP


    Netstat:
    C:\Users\mod>netstat -n |find ":80"
    
      TCP    192.168.24.60:2732     46.51.145.137:80       HERGESTELLT
      TCP    192.168.24.60:2746     85.183.195.128:80      HERGESTELLT

    The browser connects to the destination directly over the transparent proxy.

    2.
    Example with WPAD entry in DNS and NAT Rule on. Proxy Profil is in transparent mode. First start Internet Explorer:
    21:11:33 	NAT rule #1 	TCP 	  	
    
    192.168.24.60  :  2920
    → 
    192.168.24.1  :  80
      
    [SYN]  len=52  ttl=128  tos=0x00  srcmac=84:3a:4b:a1:c6:a3  dstmac=0:1a:8c:f0:4b:a1


    Netstat:
    C:\Users\mod>netstat -n |find ":80"
    
      TCP    192.168.24.60:2941     192.168.24.1:8080      HERGESTELLT
      TCP    192.168.24.60:2947     192.168.24.1:8080      HERGESTELLT


    The browser connects to the transparent proxy.

    Explanation:
    I can't describe this behavior exactly.
    1. I think the packet filter has a higher priority then the web proxy and port 80 is a shared port. I hope a sophos developer can explain this.
    2. The transparent proxy listens also to port 8080.

    Microsoft Direct Access:
    The automatic proxy configuration is the only solution for DA Clients that works without problems, if they must use the internal proxy. With static entrys in the browser an external employee can't connect to the DA Server, if he is in a hotel behind a hotspot.

    With The automatic proxy configuration and a WPAD entry this is working perfectly. The first request times out and the browser can connect directly to the hotspot portal. After authorisation the client can access the internal DNS server and WPAD can be resolved. Therefore, the client then connects to the internal proxy.

    regards
    mod
  • Yes, our experiments with DNS give different results.  I need to think about this.  I can't see an error in what you've done, and I can't prove that I didn't create some other workaround.  Hmmm.  Maybe someone else can resolve the dilemma.

    There's no question though that the packet filter rules created by WebAdmin for the web proxy have priority over those created manually, and that all other rules have priority over default drop rules, so that can't be it.

    Although the Transparent Proxy doesn't listen to port 8080, the proxy when configured as Transparent also responds as if it were in Standard mode when an 8080 packet is sent to "Internal (Address)."

    Cheers - Bob
  • Hi,

    I can confirm that the DNAT is needed if you use WPAD with DNS. Another test is to use firefox as browser as IE may get the correct address/port by a parallel configured DHCP option for WPAD. There is a good explanation here (but it's in german) and here (another but in english).

    We have no transparent profile in our config and no firewall rules that would allow port 80/443 and if there is noch DNAT then I can see the dropped packets in the firewall log. Another thing is that the WPAD download from the UTM does not work if the source network does not qualify for any proxy profile.

    Regards
    Manfred