View previous topic :: View next topic |
Author |
Message |
chinkypyro n00b

Joined: 08 Nov 2005 Posts: 2
|
Posted: Tue Nov 08, 2005 1:27 am Post subject: captive portal (sorta) |
|
|
Hi,
I am currently playing around with madwifi in master mode and I have everything up and running fine. I also have apache running on the access point. Currently the AP does not have a connection to the internet.
This is what I am trying to do.
Whenever a associated client tries to access an external page, i.e. www.google.com, they should get a page that is hosted locally by apache on the AP.
I've tried playing around with dnsmasq, but could not figure out how to do it for all external pages, only pages from specific domains. I have a feeling this is the wrong tool for the job.
I also tried to get NoCatSplash working, but it kept complaining that there was no external device since I did not have a connection to the internet.
Any suggestions? |
|
Back to top |
|
 |
Kruegi Guru

Joined: 09 Feb 2005 Posts: 406 Location: Clausthal-Zellerfeld; DE
|
Posted: Tue Nov 08, 2005 6:38 am Post subject: |
|
|
You need to redirect the packets with your firewall. Look for a guide how to setup a transparent proxy. It works similar.
On your webserver you'll need some rewrite rules to cover all URLs.
Thomas |
|
Back to top |
|
 |
chinkypyro n00b

Joined: 08 Nov 2005 Posts: 2
|
Posted: Wed Nov 09, 2005 4:01 am Post subject: |
|
|
thanks for the help Kruegi, I think I managed to get iptables to forward the traffic to apache.
would you mind elaborating on how to reconfigure apache so that it covers all URLs? |
|
Back to top |
|
 |
Kruegi Guru

Joined: 09 Feb 2005 Posts: 406 Location: Clausthal-Zellerfeld; DE
|
Posted: Wed Nov 09, 2005 7:18 am Post subject: |
|
|
Configure a vitual host (e.g. "wlan.local"):
Code: | ServerName wlan.local
[...] |
This will be the site displayed to the WLAN users.
Now configure your default host (maybe for one special IP where you are forwarding the packets to):
Code: | [...]
RewriteEgine On
RewriteRule .* http://wlan.user/ [l,r]
|
Don't forget the wlan.local DNS entry.
Thomas |
|
Back to top |
|
 |
|