How to redirect ?



  • Hello, could anyone tell me how to redirect users to my page on vhost ?

    I want to add a group of IP that will be always redirected to page with info that they are blocked.

    I have Vhost on port 82 nad i want that for example IP 192.168.0.2 on every try of connection to any IP was redirected to my vhost info 192.168.0.1:82

    In rules i see only pass, block, reject :X what with redirect ?

    [Edit]
    I see there is such an option => Firewall => NAT => Outbound => Manual Outbound NAT rule generation (Advanced Outbound NAT (AON))

    BUT…

    "Enabling this option will disable NATing for the item and stop processing outgoing NAT rules."

    It means that i should put new rules about other connections in my network ?



  • I'm not quite sure, but if you selecht AON, than you got a list of automatic generated rules. Perhaps you than could add a rule you want.


  • Rebel Alliance Developer Netgate

    What you want is not inbound NAT, but a port forward. The problem is that what you need to do with that port forward is not possible in the 1.2.3 GUI.

    In 2.0 you would setup a port forward on LAN that would match those IPs as the source, and redirect for an external address of "any", and direct it to 192.168.0.1:82



  • I think Captive Portal might be made to do what you're asking.


  • Rebel Alliance Developer Netgate

    @clarknova:

    I think Captive Portal might be made to do what you're asking.

    That can't be applied selectively to only certain IPs (at least not easily, you'd have to add a bypass for every "good" IP).

    Squid would be another way to accomplish this, setup squid and squidGuard such that the "blocked" group gets denied everything, and has your vhost URL as the error redirect, and everyone else just passes through the proxy.



  • this can not be applied selectively to few IPs…in case u want it ., use whitelisting or blacklisting algorithm



  • The problem with squid its the lack of support for load balance, but in other way its a package that can not be installed in any system for the need of resources.

    And there is no manually way to put a rule that read and alias of host and do the redirect?

    Captive portal might works but its hard to set up all white macs in pass trough.


Locked