Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2610
  • Last Modified:

is there an easy ubuntu server redirect / captive portal software?


I have an office file/webserver running on ubuntu server. I have a small company employee info site. Is there an easy way to set up a captive portal for internal/intranet traffic to go to that portal first and then be sent to the internet? I don't require authentication, although if I had it, it would have to check against a pop3 server as this current setup does not use AD (which I will change soon). I also have clearOS and a centOS server but I can not use the centOS since its a centralized syslog server. I can make another centOS if needed.


1 Solution
You can redirect the traffic using NAT.  On Redhat/CentOS you can use IPtables to accomplish this.
Search transparent proxy
You can also do so my setting the proxy settings in the web browser
kaosmadnessAuthor Commented:
Thanks... I did not want to "redirect them per se" but if they open www.google.com a captive portal would taken them to my example.com until they click on terms and conditions or they authenticate. Kinda like at Starbucks or something.
This isn't a function of the webserver - normally what happens is the DHCP server hands out an IP of a DNS server which is set up to respond to any query, no matter for what name, to a single IP, that of your captive portal.

Then the captive portal authorizes the user, bashes the IP of the client against the DHCP server to get the mac address, and then puts a custom config into the DHCP server that says "okay, now mac address so and so gets these other DNS servers and they are now put in a routable profile that will let them get to the Internet"  Then it'll flush the lease and redirect the user to the original URL, which causes the user to apply for a new lease and gets the new enabled profile.

There are some other network appliance means of accomplishing this, but none of it actually is done by your web server - the web server just answers requests that are pushed its way.

As to farzanj's comment, you can redirect traffic using NAT, but only if all your users have a gateway of your Linux router - if they're not actually routing through your Linux box, there's no way to actually push them where you need to be.

If all of your user's web browsers are set to use a proxy server (which of course, they could disable) then you could run a squid proxy and do certain rules to push the users into your captive portal too.  But keep in mind, its very defeatable.
nociSoftware EngineerCommented:
I gues you mean something like:
coova:     http://coova.org/
chillispot: http://www.chillispot.info/
kaosmadnessAuthor Commented:
Thanks!! I have coova chill installed!!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now