Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
captive portal (sorta)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
chinkypyro
n00b
n00b


Joined: 08 Nov 2005
Posts: 2

PostPosted: Tue Nov 08, 2005 1:27 am    Post subject: captive portal (sorta) Reply with quote

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
View user's profile Send private message
Kruegi
Guru
Guru


Joined: 09 Feb 2005
Posts: 406
Location: Clausthal-Zellerfeld; DE

PostPosted: Tue Nov 08, 2005 6:38 am    Post subject: Reply with quote

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
View user's profile Send private message
chinkypyro
n00b
n00b


Joined: 08 Nov 2005
Posts: 2

PostPosted: Wed Nov 09, 2005 4:01 am    Post subject: Reply with quote

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
View user's profile Send private message
Kruegi
Guru
Guru


Joined: 09 Feb 2005
Posts: 406
Location: Clausthal-Zellerfeld; DE

PostPosted: Wed Nov 09, 2005 7:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum