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

FOS18: Access to webproxy (Direct Mode) does require allowing HTTP and HTTPS within firewall rule?

Dear all,

in FOS17.5 we allowed access to the XGs webproxy on port 3128 by creating a firewall rule with allowing traffic from LAN to WAN with allowed service 3128 as documented in the following KB article: https://community.sophos.com/kb/en-us/125585.

After migrating to SFOS 18.0.0 GA-Build379 this does not work anymore. When a LAN client accesses the webproxy on port 3128, no website can be opened and the connction on the client times out. In the XGs logfile I can see the following:

1. Traffic from the LAN client to the webproxy (3128) is allowed
2. Traffic from the XGs WAN interface to the destination website is dropped

When adding HTTP & HTTPS in addition to tcp/3128 in the firewall rule everything is working fine - that however means, that transparent proxying is also allowed. To disable the transparent proxy, I need to create an additional firewall rule with allowing HTTP & HTTPS from LAN to WAN with Web Policy set to deny as mentioned in https://community.sophos.com/kb/en-us/132117.

My firewall rule for allowing access to the webproxy looks like the following:

Is this behavior normal in FSOS18 because of the new drop rule at the end, so that in addition to tcp/3128 HTTPs & HTTPs always have to be explicitly allowed in the firewall rule as well?

Thanks
Michael



This thread was automatically locked due to age.
Parents
  • The problem you are facing is most likely due to NAT.  It is possible that in your case the NAT was not migrated correctly to handle this scenario.  Delete the new firewall rule you created.

    Create a new NAT file (second tab) from Any to Any Service Any SNAT MASQ.  Try it then.  If it works you know it is a NAT problem.  You'll probably want to review and clean up all the NAT rules.  The migration does its best to make 18.0 work exactly like 17.5 but that can cause a tangle of NAT rules bound to firewall rules that don't look like they would if you created things natively.

  • Hi Michael,

    thanks for your reply. I actually already deleted the original rule that was migrated and created a new one. Regarding NAT I deleted all linked rules that were created during the mirgration and just enabled the new default NAT rule that MASQS everything from that enters the Inbound interface and leaves the Outbound interface:

    So if I understand you correctly even in v18 it should not be necessary to allow HTTP and HTTPS within the firewall rule just for using the Direct Proxy mode. To be honest I'm currently loosing the track here. Even more confusing is that in https://community.sophos.com/products/xg-firewall/f/firewall-and-policies/99918/direct-proxy-mode you wrote that for hybrid mode, port 3128 does not even need to be included at all:

    ..but that didn't work in my case either. Well, until a few minutes ago...where I figured out that this is working .... in combination with a Reject Rule as just posted: https://community.sophos.com/products/xg-firewall/f/firewall-and-policies/120741/fos18-reject-rule-is-allowing-traffic

    I'm really getting confused with the XG...or maybe the migration just broke it.

    Thanks
    Michael

  • This Standard vs Transparent Proxy is somehow the old School of doing proxy. 

    XG is moving to the Stream based, with will likely replace the "Proxy" scenarios, whenever it can. 

    As i posted in the other thread, Transparent Proxies are both, Standard and Transparent, but in the end they are proxies. They will take a request and ask the destination for the content. 

    As the rule set of XG implies, you have to deal with both. You have to allow the traffic coming from the Client (Port 3128) and you have to allow the traffic generated by the Proxy itself (Port 80/443). This will cause the duplicated need of having a firewall rule with 3128 and 80/443. 

    Most likely talking to customers, i am asking about the use case of "only allowing Port 3128". As maybe this model is in place for years. Maybe moving to Stream based could be a better solution after all?  

Reply
  • This Standard vs Transparent Proxy is somehow the old School of doing proxy. 

    XG is moving to the Stream based, with will likely replace the "Proxy" scenarios, whenever it can. 

    As i posted in the other thread, Transparent Proxies are both, Standard and Transparent, but in the end they are proxies. They will take a request and ask the destination for the content. 

    As the rule set of XG implies, you have to deal with both. You have to allow the traffic coming from the Client (Port 3128) and you have to allow the traffic generated by the Proxy itself (Port 80/443). This will cause the duplicated need of having a firewall rule with 3128 and 80/443. 

    Most likely talking to customers, i am asking about the use case of "only allowing Port 3128". As maybe this model is in place for years. Maybe moving to Stream based could be a better solution after all?  

Children
  • Hi Toni,

    thanks for you reply and explanation. I'm actually fine with using both port 3128 and 80/443 within the rule - I was just asking because I got confused because the behavior in v18 now is different than in v17.5 (in that a rule with only allowing port 3128 doesn't work anymore). I also can confirm (after another test) that the behavior in v17.5 is the same when a manually created drop all rule is inserted at the end of the rule table. That should mean the information in KB132117 (How to resolve issues related to web proxy when a drop all firewall rule is added) always applies to v18 if HTTP and HTTPS are not specified in the rule.

    In general I find it a little confusing that access to the local webproxy service also needs to be allowed within in a firewall rule since access to port 3128 is handeled in a Local ACL for device access anyway. After all, access to other local ports like SSH and HTTPS for management don't need to be specified within firewall rules either.

    I guess the reason of this is to have the ability to further restrict who actually can access the webproxy. From my point of view it however would be easier if access to port 3128 would solely be based on the Device Access settings and the firewall rules were used only for specifying who actually can access HTTP/HTTPS/FTP over it. 

    That is: The setting in Device Access should make the webproxy respond to the zone, the firewall rules specify who can actually send traffic over it. If no firewall rule is configured with that access, the webproxy should answer to hosts in the zone that proxy access is denied.

    My other thread regarding the issue with allowed access in conjunction with a reject-all rule shows that this should be possible - since in that scenario access to port 3128 is not configured in a firewall rule at all but only via Device Access.

    btw I agree with you in that stream based solutions are the future.

    Thanks
    Michael