Topic: Corporate Wired v Guest Wireless

** I am an early adopter, not a hacker, so forgive my naiveté  **

I have three options for getting online at work:

1) corporate wired network which uses automatic IP address assignment, but requires that one goes through a proxy server (proxy 1, port 8080)
2) corporate secured wireless which uses a non-broadcast SSID, LEAP authentication, and the same proxy server
3) a "guest" network which is discoverable, but has a login disclaimer page which requires one to click "I Agree"

I can sometimes get my Chumby online at work, connecting through the guest network when it seems to have a weak moment.  After a few hours, I get booted off.  I have tried to use one of my handtops (a UX380N) to serve as an ad-hoc wireless access point, but the Chumby can't seem to pull an IP from it, plus I don't know if it would work anyway, given the need for the proxy server. I've seen this second suggestion elsewhere in the forums.

I am also trying to get at Netgear wireless router set up, but can't figure out how to make it go through the proxy on the WAN side, while not requiring anything on the LAN side.

What would be ideal is if the Chumby could "click" on the "I Agree" button on the web page when trying to authenticate with the guest network.

Any ideas?

KidDoc

Re: Corporate Wired v Guest Wireless

Correction, I can pull an IP address using my ad hoc wireless hosted by my UX, but the Chumby can't reach Chumby.com.  My assumption is that it needs the proxy too.  How can I get it to use the proxy?

Re: Corporate Wired v Guest Wireless

I had a situation similar to this recently - what I did was use my laptop to look at the HTML source for the click-through page, then created a small debugchumby script to perform the same operation as the page's Submit button using curl or wget.  This should work for any system that's using MAC addresses as the session tokens.

Re: Corporate Wired v Guest Wireless

Duane,

Thanks, though you missed my initial disclaimer about being an early adopter, but not a hacker.  I was able to use my other handtop (Fujitsu u810) to mimic the mac address of the Chumby, authenticate through the guest network, and then turned the Chumby back on without incident.  It's a pain in the a--, but will work for now.  I could send the html from the access if someone wanted to create the script...

KidDoc

Re: Corporate Wired v Guest Wireless

Can your IT guys permanently add your chumby's MAC for the guest network?

Re: Corporate Wired v Guest Wireless

I can ask, but it's a big ocean, and I'm just a medium fish who hacks around too much. 

KidDoc

Re: Corporate Wired v Guest Wireless

IT guys dig chumby - more than once we've heard people get their chumbys hooked up when the IT guys saw it but couldn't use it because of their own policies.

8 (edited by Threemoons 2007-11-30 09:32:44)

Re: Corporate Wired v Guest Wireless

I recommend that you go with Option 2 and get the password for the secured network.  That's what I do. 

Good luck!

PS--and I'm one of Duane's examples above.  I got two days of BS from IT RE "security risks," etc...and then when they came to my office and saw my Chumby, they immediatley asked how to get one and coughed up our password.

Re: Corporate Wired v Guest Wireless

I have a similar question

How do I get my chumby to work at work? We have a Wireless network with an unbroacast SSID (which I can enter manually) and WEP coding (which I also know) but we also have a proxy server that is needed to access any form of the internet.

I see two solutions:
1. Figure out someway to bypass or go through the proxy (I admit I don't know much about proxies) but I think it goes through their hardware firewall.
or
2. Use my connected laptop as a wireless access point for a ad-hoc network -- There are detailed instructions in the Wiki for doing this with a MAC laptop but nothing for a PC...I appologize in advance if this has been explained elsewhere - I looked first.

Speaking with network IT guys isn't really an option since Im behind a big corporation with IT offshore.

Also If I'm able to use my laptop as an access point I'll be able to have a vehicle-mobile chumby - inverter for power and tethered bluetooth modem via blackberry for internet! That would be great!

Any help would be great - can't wait to get home and try the new control panel!

Re: Corporate Wired v Guest Wireless

Ditto here, but I am luckily a bit more of a hacker...Duane, I think I can get your curl/wget solution working, thanks for the idea!

That being said, there are enough of the "enter email address, click I agree" style login pages around for "Guest Access" to wifi that it would probably be worth Chumby's while to come up with a little more "regular user"-friendly solution. I know webbrowser is too heavy to add just for this, so we'll have to get clever, I guess. Luckily, you guys have plenty of clever...*grin*

Heading home myself to play with some ideas here!

Oh, and mikeo13...I'm not a Windows guru on this stuff...maybe something under Internet Connection Sharing (but I don't know if that allows adhoc wifi access). Another idea might be a Linux LiveCD designed to make the laptop an access point...if there isn't one around already (I bet there is), it woldn't be too hard to roll one.

Re: Corporate Wired v Guest Wireless

Duane:

I've finally gotten time to work on this (it's kinda quiet this week at work...crossing fingers). I grok the curl use, but I'm looking for a good example of a debugchumby script of this style...ie, how do I have it choose a given wireless connection, post the email addy to the form, and then start the control panel? Any examples appreciated. I think I can work through it, but some sample code would rock.  Any script you've used to do something along these lines would do, I expect...I just don't know quite which order to do things in.

Thanks!!

Re: Corporate Wired v Guest Wireless

Not working yet...here's what I have so far (which is probably VERY much wrong, but it's been awhile since I've done manual wireless connectivity...)

#!/bin/sh
fbwrite "Working on network\n"
iwconfig rausb0 "mysid"
fbwrite "Getting lease\n"
/sbin/udhcpc
fbwrite "Curling out...\n"
curl -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "l_bs_email=email@foo.bar" -o /mnt/usb/curlout.txt https://10.34.23.27/login.pl 
fbwrite "Cross fingers and sync time!!\n"
/usr/chumby/scripts/sync_time.sh

This is basically me guessing, based on what I've seen in the wired Ethernet script and such. Doesn't seem to work...after I see it run (fbwrite still writing on itself, but I'll worry about that later), it then goes to the Network config screen, which is no joy.

I need to bind to "mysid", then get connected to network (do I need the remaining config info for udhcpc, perhaps?), then post to the capture page to get registered. Then, skip network setup (which I guess it would if it was working...*Grin*)

Any help appreciated!!

Re: Corporate Wired v Guest Wireless

OK, first stupid mistake fixed...I was forgetting the essid parameter name in iwconfig (I told you it's been awhile). I've also added config info to udhcpc. Still not working, but I see it pause for a sec (although I  expect that's the sync_time failing). Any thoughts? (I also took out the fbwrites, except for a snag from rnoia to see a big of the IP config, to see if that's working at all):

#!/bin/sh
iwconfig rausb0 essid "mysid"
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0
IP=`ifconfig | grep "inet addr"`;
fbwrite "$IP"
curl -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "l_bs_email=email@foo.bar" -o /mnt/usb/curlout.txt https://10.34.23.27/login.pl 
/usr/chumby/scripts/sync_time.sh

I'm hoping I don't have to hit the capture page first, parse it, and get some dynamic parameter. That would be annoying.

14 (edited by kkennedy 2007-12-20 12:02:09)

Re: Corporate Wired v Guest Wireless

Got it! A couple of relatively minor issues, and it appears to work pretty well! (I'm having to set the clock every time I start, even w/o the time sync in the script, or "set time from Internet" turned on...it appears our work wifi blocks ntp. *shrug* I can live with that.) I was using the wrong value for a form variable (a class id instead of form name...just an oopsie), and most importantly, I had to turn on "allow insecure ssl connections" with curl via "-k". This is because the post is against the ip address (that's how I get it in browser), but obviously, the cert isn't set for that. I get the warning message about mismatched certs in my Nokia 770's browser, but it took me a bit to put everything together.

So, this script below works for me. I can put it on the wiki, as an example for booting through a capture page, but bear in mind that you have to tweak the form values (-d "foo=bar") on a case by case basis, as Duane mentions earlier in this thread. Thanks for the inspiration, Duane! Now I can show off the Chumby at work RIGHT!

Roger (rnoia), thanks for the IP parsing stuff...that helped to confirm that I was at least getting a DHCP lease. At that point, I knew I just had to keep beating on curl until it worked. Boy, is curl awesome, or what?

Duane, also please suggest any improvements that you may notice. This is just "good enough"...I don't know if it's optimal.

#!/bin/sh
# bind to wifi network...replace "mysid" with the ESSID
iwconfig rausb0 essid "mysid"
# DHCP config; should be pretty standard
udhcpc -t 5 -n -p /var/run/udhcpc.rausb0.pid -i rausb0
# this outputs your IP address from the dhcp connect...you may need it (I did)
IP=`ifconfig rausb0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }'`;
fbwrite "$IP"
# post to capture login page. this has to be customized per form (I needed the ip addy from above for the source field)
# the -k is for the insecure https connection; you can remove if the post is to http:// rather than https://
OP=`curl -k -d "_FORM_SUBMIT=1" -d "which_form=guest" -d "bs_email=email@foo.bar" -d "source=10.9.31.165" -d "error=" -d "destination=http://www.google.com" https://10.34.23.27/login.pl`;
fbwrite "$OP"

Re: Corporate Wired v Guest Wireless

I've added this to the "Chumby tricks" wiki page. Seems to be working quite well!

Re: Corporate Wired v Guest Wireless

KKennedy

I am not quite so handy with HTML.  I am just having a hard time figuring out what to pull out of the Form as submits.  Would it be possible for you to post the source for the HMTL that your scripts works for?  That way I could sort out the mapping and see what I need out of my source HTML.  Or if you'd be willing to help a guy our I can just post the html.

Thanks
Nick

Re: Corporate Wired v Guest Wireless

Wouldn't it be easier (if you had a PC, but I'm assuming you do so you can put the script on the Chumby) to spoof the Chumby's MAC address with your computer, register, and then just connect with the Chumby? Or am I missing something and that wouldn't work?