• Welcome to New Hampshire Underground.
 

News:

Please log in on the special "login" page, not on any of these normal pages. Thank you, The Procrastinating Management

"Let them march all they want, as long as they pay their taxes."  --Alexander Haig

Main Menu

need help modding a linux router for activism purposes

Started by PowerPenguin, April 12, 2010, 05:44 PM NHFT

Previous topic - Next topic

PowerPenguin

Hey all,

I'll be traveling by air next month, and I want to make it into a minor TSA-incompetence/abuse-awareness event as well. Here's my plan:

I have a Palm Pre Plus (webOS 1.4 [a linux variant, rooted]) which has a wireless AP function. I want to make its SSID "HomelandStupidity.US," and ideally configure it so people can connect to it and be automatically redirected to the site when they try to access any domain in their web browser. I tried doing some things w/ Squid and iptables, but I think I'm missing something. Here's some relevant info:

*Kernel version: 2.6.24
*"Mifi Hotspot" interface: bridge0 (when activated in the software)
*CDMA/WAN interface: ppp0

So far I've been able to force internal tcp requests to redirect to squid, but connecting to the same domain via my laptop through the phone's mobile hotspot feature still just passes the requests through w/out any modification.

The real goal here is

If URL = "http://homelandstupidity.us/*" then allow as is, else redirect to http://www.homelandstupidty.us/. The first rule would to prevent requests like http://homelandstupidty.us/somedir/thispage.html from being redirected to the main page.

Any ideas?

thinkliberty

You need to use iptables 'PREROUTING.'

You can just forward everything on port 80 to homeland stupidity... no need to use squid.

for simple instructions:
http://www.debuntu.org/how-to-redirecting-network-traffic-a-new-ip-using-iptables

for more in depth info:
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch14_:_Linux_Firewalls_Using_iptables

You might want to use a squid on a port other than 80... so you can still browse the web on your personal laptop, so you are not redirected to your site...

If you have trouble understanding the links let me know and I can give you commands to cut and paste in to the commandline.

PowerPenguin

Thanks, thinkliberty. I'll try that this weekend. I think I was making it more complicated than it had to be. I'll write some automation rules into the relevant script files, and I'll post my results here so other people can use them.