
how-to block ads
|
|   djdanska Premium,MVM join:2001-04-21 Glen Ellyn, IL clubs: | Re: [Firmware] WRT54G Captive Portal with EWRT .3 That's sweet! How did you do that? I want to do it now.. :D;) -- DirecTivo w/4.0,hmo,tivowebplus,verver. and loving it. | |
|  |  |  |  |  |  FDM80
join:2001-07-16 Silver Spring, MD
·Verizon FIOS
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 Beta said by dellsweig :My kids are going to freak out when they get home and try to surf the net - they will be greeted by my captive portal screen!! Haha, I predict a mass uprising against you. | |
|  |  |  |  |  |  mcoan
join:2002-07-29 Taos, NM | Okay, downloaded the ewrt-03beta firmware upgrade and installed. So far so good. But, are there any instructions anywhere regarding how to setup the NoCatSplash feature?
Marc in Taos, NM | |
|  bummpr
join:2004-08-15 Baraboo, WI
| I can find no documentation or guide on how to set this software up...can anyone please help the "dummies" around here on some basic setup steps.
I have the software installed (and enabled) but have no idea on how to make it work. What do the setup parameters control and how do I get it to "splash". Does this offer any kind of easy (simple) authentication to filter authorized users vs non-authorized? | |
|  |  mcoan
join:2002-07-29 Taos, NM
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 Beta I just emailed one of the developers at »www.portless.net/component/contact/ to see if they will share with us a location for documentation that explains how to set up NoCatSplash in ewrt-3beta, or else to visit here and offer help. If I hear from him, I will post back here.
Keep your fingers crossed...I REALLY want to get this to work in the historic Taos Plaza here in Taos, NM. I've got a 15dB omni antenna and a 1-watt signal amplifier ready to go...ought to be able to reach a 3-block radius, but I want everyone to have to view my splash screen.
Marc in Taos, NM | |
|   Irvingpop
@comcast.net
| Hi guys, Irving here of Portless networks. Hopefully I can help clear up some confusion. I am working on an updated FAQ and these are all good frequently asked questions.
First off, let me explain the three different filesystem types in Ewrt and how they are used:
/ (root) - r/o squashfs. This is the main filesystem containing all Ewrt data and you can only mount this filesystem readonly. /etc is contained here and is readonly as well.
/tmp - r/w memfs. /tmp is a filesystem held in RAM, meaning that if you fill it you will run out of RAM. the contents of /tmp are lost with every reboot. Some files from /etc are symlinked to /tmp/etc, and the /tmp/etc versions are written at boot time based on nvram data.
/opt - r/w jffs2. This is the new one we added for 0.3. /opt uses the leftover flash for a non-volatile journalled filesystem. you get about 1 meg on a 54G and 5 megs on a GS with Ewrt. This is a good place to store files like your custom splash pages and other content you wish to survive a reboot. /opt gets wiped when you reflash newer version of Ewrt, because the partition boundaries change.
So: to change your /tmp/etc/nocat.conf permanently, you have to change the nvram variables. You can do a "nvram show | grep NC_" on the command line or go to Access Restrictions -> Captive Portal in the web gui.
Hopefully that will answer your first question, and this will go in the FAQ.
Second question: We saw this bug during our 0.2 development but haven't seen it since. turn up your verbosity in nocat to 9 and cat /tmp/services.out. email us the info to the ewrt-devel @ portless.net list.
third question: We've captured WDS clients with 0.2 no problems, but we haven't tried it with 0.3. Again, try the steps above. Let us know if this works with 0.2 for you. | |
|  |  mcoan
join:2002-07-29 Taos, NM
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 So, keeping in mind that 99% of us are Windows users and know nothing about Linux except for Linus's name, and referring to the web GUI in this user's example: »/r0/down···_001.jpg
1. Gateway Name: Is this your router SSID? Or what? 2. Home Page: So, this is NOT the location for our custom splash page, since it's stored in "/opt - r/w jffs2". What is this domain for, then? 3. Allowed Web Hosts: What should we set this to? 4. You write, "can do a "nvram show | grep NC_" on the command line or go to Access Restrictions -> Captive Portal in the web gui." From the above GUI example, are you saying we will change Document Root to "/opt - r/w jiffs2"? I think one user mentioned above that whenever he changes the root location here, it defaults back to that displayed in the link above. 5. Should we leave Exclude Ports, Login Timeout, and Verbosity at their default values since most of us haven't a clue what these mean?
Thanks for your help.
Marc | |
|  |  |   dellsweig Extreme Aerobatics Premium,MVM join:2003-12-10 Campbell Hall, NY
·Time Warner VOIP
·Vonage
·RoadRunner Cable
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 said by mcoan :So, keeping in mind that 99% of us are Windows users and know nothing about Linux except for Linus's name, and referring to the web GUI in this user's example: » /r0/down···_001.jpg1. Gateway Name: Is this your router SSID? Or what? 2. Home Page: So, this is NOT the location for our custom splash page, since it's stored in "/opt - r/w jffs2". What is this domain for, then? 3. Allowed Web Hosts: What should we set this to? 4. You write, "can do a "nvram show | grep NC_" on the command line or go to Access Restrictions -> Captive Portal in the web gui." From the above GUI example, are you saying we will change Document Root to "/opt - r/w jiffs2"? I think one user mentioned above that whenever he changes the root location here, it defaults back to that displayed in the link above. 5. Should we leave Exclude Ports, Login Timeout, and Verbosity at their default values since most of us haven't a clue what these mean? Thanks for your help. Marc Marc
Make sure you PM me or email me with anything you find out!!!! I want to get this one working as well!! -- »aerobatix.webhop.net | |
|  GreyGhost00
join:2005-03-01 Washington, DC
| I've been trying to do this as well, and have succeeded in getting it set up and working properly - now all I need to do is change the splash page. That's where I need help as a total Linux noob. I don't know if you have to get the source code and recompile and then re-flash the device, or if you can just change the actual file somehow.
There is a console under the diagnostics of the web interface that appears to be a linux command-line screen.
As for the meaning of the fields on the NoCat web interface page within the WRT54g,
Allowed web hosts: lists those domains that bypass the splash page process. Document root: lists the relative path on the device itself to where the pages reside. Got these from their listserve archives:
Exclude Ports: Modifies the outbound firewall rules to deny any outbound traffic destined to those ports. It is commonly used to block outbound SMTP traffic (port 25) so that a hotspot could not be used by spammers. Login Timeout: The number of seconds before a user gets the splash page again. Most people set this to be about a day (86400 seconds) Verbosity: Specifies how verbose the log file (currently /tmp/services.out) is. the 10 setting is for debugging only and will quickly fill your memory, so watch out! | |
|  |   dellsweig Extreme Aerobatics Premium,MVM join:2003-12-10 Campbell Hall, NY
·Time Warner VOIP
·Vonage
·RoadRunner Cable
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 said by GreyGhost00 :I've been trying to do this as well, and have succeeded in getting it set up and working properly - now all I need to do is change the splash page. That's where I need help as a total Linux noob. I don't know if you have to get the source code and recompile and then re-flash the device, or if you can just change the actual file somehow. There is a console under the diagnostics of the web interface that appears to be a linux command-line screen. As for the meaning of the fields on the NoCat web interface page within the WRT54g, Allowed web hosts: lists those domains that bypass the splash page process. Document root: lists the relative path on the device itself to where the pages reside. Got these from their listserve archives: Exclude Ports: Modifies the outbound firewall rules to deny any outbound traffic destined to those ports. It is commonly used to block outbound SMTP traffic (port 25) so that a hotspot could not be used by spammers. Login Timeout: The number of seconds before a user gets the splash page again. Most people set this to be about a day (86400 seconds) Verbosity: Specifies how verbose the log file (currently /tmp/services.out) is. the 10 setting is for debugging only and will quickly fill your memory, so watch out! The key to the web interface is DocumentRoot. If you could change document root, then you can point it to your own html file on the RW file system /opt. The trouble is I cant seem to get this value to change!! -- »aerobatix.webhop.net | |
|  |  |  GreyGhost00
join:2005-03-01 Washington, DC | Re: [Firmware] WRT54G Captive Portal with EWRT .3 How are you accessing the files on the WRT54g? SSH? Telnet? Prayer? Again, I'm a Linux noob, so throw me a bone. | |
|  |  |  |  |  |  |  |  |  |  |  mcoan
join:2002-07-29 Taos, NM
| Re: [Firmware] WRT54G Captive Portal with EWRT .3
Here is a helpful post that was a great reply to my request for more specific instructions. I haven't tried the steps yet, but will today. This post was on the Linksysinfo.org site at: »www.linksysinfo.org/modules.php?···80#12180
--------------------------------------------------------- Thanks to the information provided by mcoan, I''ve been able to crack this nut. Here''s how:
First, you''re going to need to get an SSH client and an SCP client if you use Windows. I recommend PuTTY and PSCP, respectively. You can find them both at »www.chiark.greenend.org.uk/~sgta···oad.html -- they''re free and open source.
Next, of course, you need to update the router''s firmware. I''m sure you''ve figured this one out already.
Now for the more involved part. First, I''ll show you how to get the existing splash page and contents off the router so you can base your own splash page off of them. Next, I''ll show you how to copy your modified splash page to the router. And finally, I''ll show you how to make your router recognize the location of the modified splash page.
To get the existing splash page off of your router, open up a command prompt (Start -> Run. Type \"cmd\" and hit Enter.) and navigate your way to the location of the pscp.exe file you downloaded. For example, if you kept the pscp.exe file in the C:\\scp\\ folder, you''d type this:
[code:1:f05de0bf14]cd C:\\scp\\ <Enter>[/code:1:f05de0bf14]
(Note: Don''t type the \"<Enter>\" part. That''s where you hit the enter key.)
Now you need to copy the files to your local computer. I''m going to assume you want them to end up at C:\\scp\\htdocs\\ -- you can put them anywhere, but be wary of putting them anywehere there''s a space in a directory name... that''s asking for trouble. Type the following at the command prompt:
[code:1:f05de0bf14]pscp.exe -l root -r 192.168.1.1:/usr/share/nocat/htdocs C:\\scp\\ <Enter>[/code:1:f05de0bf14]
It will then ask for the router''s password (the same password as the login to the Web interface). Type in your password and it will show the files as they''re being copied. Unless it gives you an error, it worked.
Next, go ahead and modify the existing splash page to your heart''s content. (How to modify the splash page is beyond the scope of this post.) Go back to your command prompt and make your way to the C:\\scp\\ directory again. Then type in the following command:
[code:1:f05de0bf14]pscp.exe -l root -r C:\\scp\\htdocs\\ 192.168.1.1:/opt/htdocs <Enter>[/code:1:f05de0bf14]
Again, it will ask for the router''s password. And again, it will show the files as they''re being copied. Unless you run into an error, the copying was successful.
That''s all you need to do to copy the files to the router. Using the above command, you''ve taken the C:\\scp\\htdocs\\ directory and copied it over to the router at /opt/htdocs. Now you have to make sure the router is looking in the right place for the splash page. As dellsweig found, just changing the Document Root variable in the Web GUI doesn''t seem to work. This is pretty easily fixed.
Open up putty.exe. (You only need to double-click on this one.) Enter the IP address of the router in the Host Name (or IP Address) field. Make sure the SSH radio button is selected and click on the Open button.
It will ask for the login name. Use \"root\" for the login name the same password as before for the password. (Note: It will not show anything as you type in the password, but it''s still accepting what you type.)
Once the prompt--\"ewrt ~#\"--comes up, type in the following:
[code:1:f05de0bf14]cd /opt/htdocs <Enter> ls <Enter>[/code:1:f05de0bf14]
If you see a list of the splash page files, you''ve succeeded thus far.
Now, type in:
[code:1:f05de0bf14]nvram show | grep NC_ <Enter>[/code:1:f05de0bf14]
It should display several variables and their values. The key variable here is NC_DocumentRoot. We need to change this variable to point to the right place. So type in the following command:
[code:1:f05de0bf14]nvram set NC_DocumentRoot=/opt/htdocs/ <Enter>[/code:1:f05de0bf14]
If this works, it will bring up another prompt--\"ewrt /opt/htdocs#\"--immediately below the previous one. (Generally speaking, with Linux, if it doesn''t complain, that means it worked.) Now hit the up arrow key twice (which will bring up the grep command you typed in earlier) and hit enter. If all went well, you should see that the NC_DocumentRoot value has changed to the appropriate value.
Close the putty.exe window and click OK to accept closing the session.
That''s it. You''re done!
I must thank mcoan for posting that information. Without the hint to check the NVRAM, I wouldn''t have gotten this to work.
As for your other questions, mcoan, I''m afraid I can''t really answer any of them. I''ll be sure to post here again if I find out the answers. ---------------------------------------------------------
Pretty darned complicated, I must say, but I'm willing to try it. | |
|  |  |  |  |  |  mcoan
join:2002-07-29 Taos, NM
| Okay, I was able to get this to work, with many thanks to "glhines" (the solver's) post at »www.linksysinfo.org/modules.php?···80#12180.
However, when I pasted his post from there to here, a bunch of strange HTML codes showed up. So, here's the correct, easy-to-read version: ----------------------------------------------------------------------- Thanks to the information provided by mcoan, Ive been able to crack this nut. Heres how:
First, youre going to need to get an SSH client and an SCP client if you use Windows. I recommend PuTTY and PSCP, respectively. You can find them both at »www.chiark.greenend.org.uk/~sgta···oad.html -- they're free and open source.
Next, of course, you need to update the routers firmware. Im sure you've figured this one out already.
Now for the more involved part. First, Ill show you how to get the existing splash page and contents off the router so you can base your own splash page off of them. Next, Ill show you how to copy your modified splash page to the router. And finally, Ill show you how to make your router recognize the location of the modified splash page.
To get the existing splash page off of your router, open up a command prompt (Start -> Run. Type \"cmd\" and hit Enter.) and navigate your way to the location of the pscp.exe file you downloaded. For example, if you kept the pscp.exe file in the C:\temp\ folder, you'd type this:
cd C:\temp\ (Note: Dont type the part. Thats where you hit the enter key.)
Now you need to copy the files to your local computer. Im going to assume you want them to end up at C:\temp\htdocs\ -- you can put them anywhere, but be wary of putting them anywhere theres a space in a directory name... that's asking for trouble. Type the following at the command prompt:
pscp.exe -l root -r 192.168.1.1:/usr/share/nocat/htdocs C:\temp\
It will then ask for the routers password (the same password as the login to the Web interface). Type in your password (won't show on screen) and it will show the files as they're being copied. Unless it gives you an error, it worked.
Next, go ahead and modify the existing splash page to your heart's content. (How to modify the splash page is beyond the scope of this post, but try a tool like FrontPage.) Go back to your command prompt and make your way to the C:\temp\ directory again. Then type in the following command:
pscp.exe -l root -r C:\temp\htdocs\ 192.168.1.1:/opt/htdocs
Again, it will ask for the routers password. And again, it will show the files as theyre being copied. Unless you run into an error, the copying was successful.
Thats all you need to do to copy the files to the router. Using the above command, youve taken the C:\\scp\\htdocs\\ directory and copied it over to the router at /opt/htdocs. Now you have to make sure the router is looking in the right place for the splash page. As dellsweig found, just changing the Document Root variable in the Web GUI doesnt seem to work. This is pretty easily fixed.
Open up putty.exe. (You only need to double-click on this one.) Enter the IP address of the router in the Host Name (or IP Address) field. Make sure the SSH radio button is selected and click on the Open button.
It will ask for the login name. Use \"root\" for the login name the same password as before for the password. (Note: It will not show anything as you type in the password, but its still accepting what you type.)
Once the prompt, i.e., "ewrt~#\" comesup, type in the following:
cd /opt/htdocs ls
If you see a list of the splash page files, youve succeeded thus far.
Now, type in:
nvram show | grep NC_
It should display several variables and their values. The key variable here is NC_DocumentRoot. We need to change this variable to point to the right place. So type in the following command:
nvram set NC_DocumentRoot=/opt/htdocs/
If this works, it will bring up another prompt: "ewrt /opt/htdocs#\" immediately below the previous one. (Generally speaking, with Linux, if it doesnt complain, that means it worked.) Now hit the up arrow key twice (which will bring up the grep command you typed in earlier) and hit enter. If all went well, you should see that the NC_DocumentRoot value has changed to the appropriate value, /opt/htdocs/.
Close the putty.exe window and click OK to accept closing the session.
That's it. You're done! --------------------------
Thanks again to glhines for his great instructions.
-Marc | |
|  mcoan
join:2002-07-29 Taos, NM | Now, I have it working with my own custom splash page, but it STILL makes me click the login button twice in order to access the 'net. Anyone know a fix for this?
Marc | |
|  |   dellsweig Extreme Aerobatics Premium,MVM join:2003-12-10 Campbell Hall, NY
·Time Warner VOIP
·Vonage
·RoadRunner Cable
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 Beta said by mcoan :Now, I have it working with my own custom splash page, but it STILL makes me click the login button twice in order to access the 'net. Anyone know a fix for this? Marc I am waiting for the answer to this one as well...... -- »aerobatix.webhop.net | |
|  |  |  mcoan
join:2002-07-29 Taos, NM
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 Beta The following was emailed to me by dellsweig in response to my request for any update on the "double login" issue. He gave me permission to post his response:
> No, I have not resolved the splash page/login issue. But I have been > having some stability issues with EWRT as well. I had the WAN > interface fail on 2 separate WRT54G's. I returned one and it failed > again. All were 2.2 hardware. > > The WAN light on the front would flash VERY rapidly - not like the normal > on/off you would see when it is connected to the cable modem.. > > I could not ping out the WAN interface either. Did not matter if I assigned > static values for the WAN or let DHCP do its thing. The only thing in > common for these failed routers was EWRT. > > I did factory resets - cleared NVRAM, used the linksys factory upgrade tool > to re-flash 3.x.x, then put DDWRT back on and the device was OK again.... > > I have fallen back to DD-WRT and will wait till ERWT does his next > release. > > I really want the captive portal but I cant put this device in a > commercial establishment (Deli) without backup/restore > capability.... > > As for the splash twice issue - I can live with that - I don't see > anywhere in the HTML code why this would occur. It must have to do > with the way the iptables are mangled before the passthough occurs. > > I spoke to Brian (DDWRT) - he is adding chillispot (another captive portal > thing) into DDWRT. He has a build but wanted to do more testing before he > gave it to me. > > I think the thing I like the most about EWRT is the R/W file system and the > ability to have the captive portal web code local on the router. Chillispot > will require an external web server. I am not sure if this has to be on the > local LAN....
NOW I'M CURIOUS: Are other folks running EWRT-3beta experiencing either stability problems as described above, and/or the "must login twice" issue?
Marc | |
|  |  |   dellsweig Extreme Aerobatics Premium,MVM join:2003-12-10 Campbell Hall, NY
·Time Warner VOIP
·Vonage
·RoadRunner Cable
| Re: [Firmware] WRT54G Captive Portal with EWRT .3 Beta said by jaa :I must be doing something wrong. I can't get a changed splash screen to come up. I put the screen in /opt/htdocs and verified. I set NC_DocumentRoot=/opt/htdocs and verified. I still get the old splash screen. If I powercycle the router, the NC_DocumentRoot value gets reset. Where am I going wrong? Edit: Nevermind. I must be slow today - tried it the third time and it is working fine. I must have been doing something wrong. JAA - What version Linksys WRT54G are you runnign this on. I have had some problems using EWRT .3 on 2.2 hardware.... -- »aerobatix.webhop.net | |
|  |   happydat
@knology.net
| I'm trying to copy the captive portal page files from ewrt-3 to change them. I followed your instructions - ssh-pscp, when I type the copy command i get "empty usrname". I think this is the point you said I should get "password?". I'm just using the default password for now and no username on the router. That will change soon. What do I need to do to get to the next step of copying files? don't know where to set up a username for the router.
Thanks for your help Scott | |
|  | |  |
|