Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm going to be in a position shortly where I need to provide a router to run a small wireless network, local networked file storage and internet access to a small group (10 people or so). I've already got an Asus RTN16, which I'd like to use for its built in network storage capability but I'm not averse to buying new kit to supplement or replace as required. My big sticking point is that the internet I'll have to connect to will be an infrastructure network with an HTTP login portal before proper internet access is provided. I know this is a terrible situation, but I've got a bat's chance in Hell of getting a network admin to even give me the time of day.

My current plan is to use a raspberry pi with a wifi dongle to connect to this WAN and sort out wifi login via VNC, using a real browser on it. In that situation, the raspberry pi's wired connection would presumably have to be on the WAN of the router with an manually assigned IP (how should I choose this?) and so should be reachable from the LAN side of my router to fix the WiFi login as required. Routing between the two interfaces on the pi shouldn't pose any problems, and all traffic should look like it's come from the raspberry pi with its DHCP-acquired IP on the WiFi side.

Does that make any sense, will it work and am I missing a more obvious/reliable solution?

share|improve this question

1 Answer 1

There is a better solution, the use of wget on your ASUS to login to the HTTP portal via CLI. Its standard manual page states:

# Log in to the server.  This can be done only once.                   
 wget --save-cookies cookies.txt --post-data 'user=foo&password=bar' http://server.com/auth.php

I suggest a slight modification to this,

 wget --save-cookies cookies.txt --post-data 'user=foo&password=bar' --keep-session-cookies --delete-after http://server.com/auth.php

The two new parameters make sure you keep the cookies (because these contain information relevant to authentication) and delete the authentication page because you are only interested in the authentication process, not in the Web page.

This command can easily be scripted, inserted in you .bashrc file, or in at/cron jobs regularly monitoring network access, all without the Raspberry Pi.

share|improve this answer
    
Many HTTP portals are more complicated than that, requiring that a auto-refreshing webpage be left behind or else the authentication times out. –  BatchyX Nov 12 '13 at 19:18
    
True, I do not know how that particular portal works, but perhaps he can take it from here. –  MariusMatutiae Nov 12 '13 at 19:21
    
I can see the login side of that will (probably) work, I'm not too confident that I can get my router to treat the wireless network as a WAN - the wireless bridging feature it includes looks like it's intended for wireless range extension within a LAN. Am I missing something? –  TimD Nov 12 '13 at 19:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.