From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 01:28, 15 February 2007 (edit)
Whiteboy (Talk | contribs)

← Previous diff
Revision as of 02:49, 15 February 2007 (edit) (undo)
Whiteboy (Talk | contribs)
Next diff →
Line 161: Line 161:
2. DNS must happen in order for the redirection to occur - so if you are testing on a machine that is not connected up you will not see the capture page. 2. DNS must happen in order for the redirection to occur - so if you are testing on a machine that is not connected up you will not see the capture page.
-= References =+=References=<br><br>
[[Category:English documentation]] [[Category:English documentation]]
-[[Category:Basic HOWTO]]+[[Category:Basic tutorials]]

Revision as of 02:49, 15 February 2007

Enabling the use of NoCatSplash allows you to redirect a client to a specific web page when connecting via wireless or wired. It can redirect the client to a Splash URL hosted online (not on the router's filsystem). It can use the JFFS2 filesystem services on the router, so hosting the splash page can be done directly on the router. After being redirected to the splash page, the client can click on an 'I Agree', 'Continue' or similar button of your choosing on the splash page, and it brings the user to the page they were originally loading (or sends the client to the site of your choosing).

This could be use to advertise your neighbourhood wLAN, or display a splash screen in a cafe. While Authentication was originally envisioned for NoCat (NoCatAuth), support has been removed to make this as streamlined as possible. The DD-WRT version just displays a splash screen and nothing else. It will intercept the client's browser when the timeout period expires. So, once a day, or whatever interval you choose, the client will pull up the splash screen.

For me, NoCatSplash has been an easy point and click affair, using a Splash URL (not hosted locally on the router).

Simply enable NoCatSplash, enter your Homepage (this is the page people will be redirected to, after seeing the splash page), then add your Allowed Web Hosts (This should be/include the domain of the Splash URL. ex: if your Splash url is on; Your allowed host should be (Don't have the http:// part on the allowed web hosts), Don't change the Document Root (leave it alone), Enter your Splash URL (ex:

I left all of the other settings alone, and mine works fine!

A Notable Quirk: Your Splash page won't show anything linked outside of the html file if the Splash URL isn't hosted on the router or through a Samba mount. For example .css and images won't load, but style tags in the HEAD of your html page will.



Note: You must have a DD-WRT Version installed which includes Nocatsplash, like the standard version and you must have enough free memory.

1. In DD-WRT under Administration/Management enable under JFFS2 Support the first time both tags: JFFS2 and Clean JFFS2

2. reboot the system

3. create a folder named nocat per telnet (open your-router-ip, Login, mkdir /jffs/nocat)

4. check per telnet if the folder is created. (cd /jffs/nocat)

5. enable SSH in DD-WRT (under Administration/Services Secure Shell - enable)

6. Now you can enable SSH under remote Management (Administration/Management/Remote Access SSH Management enable)

7. Next you can start to create a Splash.html page. the easiest way is: copy the html text of an example into a new txt file and save this. Here is an example under splash.html: Then rename this to splash.html. Thats it. You can make changes in text, colours,etc.

8. Upload the splash.html file to /jffs/nocat. For Windows user: Download the Program Winscp and use this one. It is important that you use as Protocol SCP !!!

9. Finally configure DD-WRT as Described below.

Splash Page Code

Typical Oversight A typical problem with most installations is the administrator (you) forgetting that the splash page must contain a form with a button that submits certain data to the router, allowing it to "know" which clients have or have not visited the splash page.

Solution: The Form code for your "I Accept" button is similar to the following. This was taken from the original nocat splash page:

 <form name="login" method="post" action="">
     <div align="center">
          <input type="hidden" name="accept_terms" value="yes" />       
          <input type="hidden" name="redirect" value="">
          <input type="hidden"    name="mode_login">
          <!--<input type="image"    name="mode_login"   src="images/login.gif" border="0">-->
          <input type="submit" value="enter">
          <!--<input type="submit" value="submit">-->

! Why are some of the buttons commented out. What actual data does the form need?!

Alternatively in the above example you can use "$redirect" for the redirect location (instead of to allow the client to browse to their originally intended site vs. always being redirected to the site of your choosing.




To make the configuration options appear, you have to enable NoCatSplash then Save the configuration. Now you can configure the options.
When finished configuring, use "Reboot Router".

Gateway Name
The name of the gateway. Whatever you want to call it. "Joe's Pizza Shop and free DSL Cafe" for example. Use the variable $GatewayName in your splash.html page to display this.

Space separated list of hostnames.
List any hosts (for example, the webserver with the splash page, or other websites) that you would like to allow clients to have web access to (TCP port 80 (HTTP) and 443 (HTTPS?)) before they "log in" (before they click on "I Accept" in your splash page), however actual authentication is not supported.
List any webservers, that you would like connecting clients to be able to access, before clicking on I Agree on the initial nocatsplash screen. Such as the webserver hosting your EULA or Welcome Page, if it isn't the router itself.

Document Root
Where all of the application templates (including SplashForm) are hiding. Can be different from Apache's DocumentRoot.
splash.html is the form displayed to users on capture.

Splash URL
Optional URL to fetch dynamic remote splash page from.
Leave empty if using a page stored on the router.

Space separated list of ports.
Specify TCP ports to denied access to when public class users login. All others will be allowed. If nothing is specified, access is granted to all ports to public class users.

You should *always* exclude port 25 (SMTP), unless you want to run a portal for wanton spam sending. Users should have their own way of sending mail. It sucks, but that's the way it is.

MAC White List

Add a space separated list of MAC-addresses that should have unlimited Internet Access. The MAC addresses listed in this field will not be redirected to the Splash-page but have internet-access straight away.

Login Timeout
How much time, in seconds, elapses before the client has to see the splash screen again, and click on 'I Agree'. How often a client is shown the EULA or other designated splash page.

For Open Mode portals, you probably want to set LoginTimeout to something large (like 86400, for one notification per day). Open Mode, is the only mode supported at this time.

Log verbosity (to syslogd)

  • 0 is (almost) no logging.
  • 10 is log everything.
  • 5 is probably a safe middle road.

Route only
Required only if you DO NOT want your gateway to act as a NAT.
Enable this only if you're running a strictly routed network, and don't need the gateway to enable NAT for you. You would not normally use this option. So if you don't understand it, leave it to No/Off.

A few things I found while looking for documentation on the net: In the nocat.conf file (you'll have to telnet or ssh into the router to set these)
comment: The only supported option at this time. I don't think it has to be set. GatewayMode Open
comment: The IP Range which will see the splash page.
comment: The LAN/wLAN IP of the router. I don't think it needs to be set
comment: The DNS server. Again, I don't think this needs to be set here.

Advanced Configuration


Configuration file:
/etc # cat nocat.conf

nvram entries:

NC_ExcludePorts=25 21 23


The TCP port to bind the gateway service to. 5280 is de-facto standard for NoCatSplash.

Just a couple things to keep in mind when using/testing this:

1. Since this is a web portal capture only, no other traffic is blocked.

2. DNS must happen in order for the redirection to occur - so if you are testing on a machine that is not connected up you will not see the capture page.