Redirecting Rules For SafeSquid Captive Portal

Redirecting Rules For SafeSquid Captive Portal

Enable IP forwarding in SafeSquid Server

Enable forwarding in /etc/sysctl.conf, by changing below line
net.ipv4.ip_forward=0 to net.ipv4.ip_forward=1
To reload settings run below command
  1. sysctl -p
To flush the IP tables rules
  1. iptables -F -t nat

Redirect traffic 

Forward the traffic from port 80 to 8081 
  1. iptables -t nat -A PREROUTING  -tcp -m tcp --dport 80 -j REDIRECT --to-ports 8081
Forward the traffic from port 443 to 8443 
  1. iptables -t nat -A PREROUTING  -tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443

Verify redirection policies using following command (On Linux Box) 

  1. iptables -L -v -n -t nat

Finally, to save IP table

Then save the IP table rules by using below command
  1. apt-get install iptables-persistent
  2. iptables-save >> /etc/iptables/rules.v4
Note: Redirection policies will not flush even you reboot proxy server.


    • Related Articles

    • Enable captive portal port on SafeSquid

      Access The SafeSquid User Interface Click on Configure Page (Top right corner of the interface) Click on Application Setup Click on Network Settings. Then enable "CAPTIVE_PORTAL" and "SSL_TRANSPARENT" entries in the “Listen Subsection" Then Save the ...
    • Secure WIFI Access Through Active Directory Infrastructure And SafeSquid Captive Portal

      Business challenge Securing Unmonitored and Unsecured WIFI networks is a challenge that many organizations are looking forward to address. As increased demand for BYOD (bring your own device), WIFI is common and minimum facility required in every ...
    • Manage SafeSquid Instances From Self Service Portal

      Manage SafeSquid instances From Self Service Portal
    • Access The Self Service Portal

      Overview Access your self-service portal with your registered credentials to manage SafeSquid’s cloud-backed features, like Custom Web Categorization, VPN support, Configuration Backup, Subscription management and SSL certificates generation. ...
    • Manage Keyword Signatures using Self Service portal

      We're going to assume that you've an active SafeSquid account with atleast one Activation Key. If this is not completed yet, you can register at https://key.safesquid.com/ Login to the Self-Service Portal by visiting https://key.safesquid.com/on your ...