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

PPTP Server access - restricted to "known good IP range"

I didn't see anything on the boards about how to accomplish this. I want to restrict access to PPTP to a "known good" management group of IPs. This wouldn't be a typical scenario as it requires PPTP connections be made from a known-good network.

I built an allow-good-ips on the firewall to allow pptp through from my sites. And a corresponding block-bad-ips to block pptp from all other sites. Allow was set before deny. I turned only the deny rule on yet the pptp server still accepted requests.

Recently had a similar issue with getting the Web Application Firewall running for IP restriction. Workaround there was to run it through NAT first. Built same allow and block rules in NAT, send the block one to a blackhole, works.


This thread was automatically locked due to age.
Parents
  • Great question, darcym!

    In general, the rule is: DNATs before VPNs/Proxies and, finally, Firewall rules.

    After a few years here, I learned enough about the underlying technology, iptables, to understand why that rule applies: DNATs normally use "(Address)" objects created by WebAdmin when you define an Interface or an Additional Address, and Firewall rules normally use Network/Host definitions you create manually.

    When you use an "(Address)" object, it causes the rule to apply to the INPUT chain because the object is bound to an interface.  I always recommend against creating Host/Network definitions bound to an interface*; in fact, almost all definitions are not, so the rules they're used in apply to the FORWARD chain.  Rules for the INPUT chain are evaluated before rules for the FORWARD chain.

    The general rule also could be stated as: INPUT chain rules before VPNs/Proxies and, finally, FORWARD chain rules.
    Another detail is that VPNs and Proxies have invisible Firewall rules for the INPUT chain that capture traffic before manually created rules are applied.

    Soooooo, you can make Firewall rules for the INPUT chain by using "(Address)" or "(Network)" objects in those rules, as that's what makes DNAT rules apply to the INPUT chain.  However, you have to use DNATs to affect traffic using any port in use by a VPN or Proxy.

    Cheers - Bob
    * Yes, instead of using an "(Address)/(Network)" object, you could bind a Host/Network defintion to an interface and use it to make a rule apply to the INPUT chain.  Binding a definition to a specific interface can cause mysterious routing problems for VPNs and NAT rules, so always leave 'Interface: >' unless instructed differently by an Astaro/Sophos engineer.
Reply
  • Great question, darcym!

    In general, the rule is: DNATs before VPNs/Proxies and, finally, Firewall rules.

    After a few years here, I learned enough about the underlying technology, iptables, to understand why that rule applies: DNATs normally use "(Address)" objects created by WebAdmin when you define an Interface or an Additional Address, and Firewall rules normally use Network/Host definitions you create manually.

    When you use an "(Address)" object, it causes the rule to apply to the INPUT chain because the object is bound to an interface.  I always recommend against creating Host/Network definitions bound to an interface*; in fact, almost all definitions are not, so the rules they're used in apply to the FORWARD chain.  Rules for the INPUT chain are evaluated before rules for the FORWARD chain.

    The general rule also could be stated as: INPUT chain rules before VPNs/Proxies and, finally, FORWARD chain rules.
    Another detail is that VPNs and Proxies have invisible Firewall rules for the INPUT chain that capture traffic before manually created rules are applied.

    Soooooo, you can make Firewall rules for the INPUT chain by using "(Address)" or "(Network)" objects in those rules, as that's what makes DNAT rules apply to the INPUT chain.  However, you have to use DNATs to affect traffic using any port in use by a VPN or Proxy.

    Cheers - Bob
    * Yes, instead of using an "(Address)/(Network)" object, you could bind a Host/Network defintion to an interface and use it to make a rule apply to the INPUT chain.  Binding a definition to a specific interface can cause mysterious routing problems for VPNs and NAT rules, so always leave 'Interface: >' unless instructed differently by an Astaro/Sophos engineer.
Children