Penguin

Differences between current version and predecessor to the previous major change of DSL-302G.

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 35 Last edited on Wednesday, July 28, 2010 6:13:59 am by SuadMusovich
Older page: version 29 Last edited on Saturday, August 5, 2006 12:22:36 pm by MattBrown Revert
@@ -1,15 +1,18 @@
 The DLink DSL-302G [ADSL] modem is actually a router/[DHCP]-server. What this means is that it is extremely simple to make this modem work with Linux. The following information describes how to get everything set up using the DebianLinux Sarge distribution running [GNOME] 2.8, but should be applicable to most [LinuxDistribution]s. 
  
 !Connecting 
  
- # Connect up the system physically. If the DSL-302G is the only thing you wish to connect to a particular phone jack, then you can just connect the [ADSL] modem directly to the socket. If you wish to run some other device (eg a standard modem, phone or fax) via the same phone jack then use the provided filter device which has both "[ADSL]" and "phone" outputs. In addition, all other phones/faxes/etc need to have a filter inserted between them and the existing phone jack in order to prevent the [ADSL] signal being audible to those devices. 
+ # Connect up the system physically. If the DSL-302G is the only thing you wish to connect to a particular phone jack, then you can just connect the [ADSL] modem directly to the socket. If you wish to run some other device (e.g. a standard modem, phone or fax) via the same phone jack then use the provided filter device which has both "[ADSL]" and "phone" outputs. In addition, all other phones/faxes/etc. need to have a filter inserted between them and the existing phone jack in order to prevent the [ADSL] signal being audible to those devices.  
+  
  
  # Connect the DSL-302G to your PC via an ethernet cable. The DSL-302G also provides a [USB] 1.1 connection; if you get this working then please add information on this to this page! 
+  
  
  # Define an "eth0" network connection. You can do this using graphical desktop tools (eg "Applications|System Tools|Networking") or by editing /etc/network/interfaces (see "man 5 interfaces"). Simply select "[DHCP]" for this interface and ignore all other options. 
  
- # Start the "eth0" connection, by selecting "activate" in the networking GUI admin tool, or running "ifup eth0" (as the root user) from the command-line. Linux will broadcast a [DHCP] request using the eth0 network interface, and the DSL-302G will respond by providing a local address for linux to use. Unless explicitly configured otherwise, the DSL-302G assigns itself the address of 10.1.1.1 and (typically) provides the (local) address of 10.1.1.3 for your system to use. 
+  
+ # Start the "eth0" connection, by selecting "activate" in the networking GUI admin tool, or running "ifup eth0" (as the root user) from the command-line. Linux will broadcast a [DHCP] request using the eth0 network interface, and the DSL-302G will respond by providing a local address for Linux to use. Unless explicitly configured otherwise, the DSL-302G assigns itself the address of 10.1.1.1 and (typically) provides the (local) address of 10.1.1.3 for your system to use. 
  
  Note that you can arrange for the eth0 network interface to be started when your machine boots. 
  
  # Start a web browser (eg Mozilla) and go to "http://10.1.1.1" to access the modem's internal web server in order to configure the modem. When presented with a login page, enter "admin" for the user and "admin" for the password. Select the "Username and Password" link, and enter the username and password you arranged with your [ISP]. Finally select "ok" to reconfigure the modem. 
@@ -17,30 +20,32 @@
 Edit by Leslie Katz, Australia: 
 I was unable to access the modem's internal web server with the Firefox for Linux web browser. As I have a dual-booting system, I changed to Windows and tried Firefox for Windows. Again, I was unable to gain access. I then tried Internet Explorer, with which I was able to gain access. I found that any saved changes made while using Internet Explorer persisted when I booted into Linux, so that making any needed changes with Internet Explorer is an adequate substitute for those with a dual-booting machine who, like me, have no success with Firefox for Linux. 
 Further, in addition to typing in "http://10.1.1.1" in Internet Explorer, one can (at least with my firmware: r2.01m.b34.au(021206a/t93.3.44)) type in "http://10.1.1.1/mainpage?id=", followed by a number between one and thirty-one. One will then be prompted for one's user name and password and, after they are entered correctly, a page will open. In the case of pages ten (Routing Information Protocol Configuration), nineteen (IP Filter Configuration) and twenty (Firewall Configuration), the page is unhelpful. 
  
- Note that the DSL-302G appears to use some non-standards-compliant [HTML] in its admin interface, and so some of the page looks a little odd.  
- In particular, you must click on the "ok " text, not on the grey button that appears to the left of this text. 
+ Note that the DSL-302G appears to use some non-standards-compliant [HTML] in its admin interface, and so some of the pages look a little odd.  
+ In particular, you must click on the "OK " text, NOT on the grey button that appears to the left of this text. 
  
  
 You should now have broadband access! 
  
 ! Security 
  
-Because the DSL-302G runs as a router providing [NAT] (Network Address Translation) it is effectively impossible for any computer elsewhere on the internet to initiate network connections to your machine. The only way other computers can transfer data to your PC is as ''response data'' to requests originating from your PC (eg sending back web pages you have requested). This provides excellent security; separate firewall software is therefore generally not needed. 
+Because the DSL-302G runs as a router providing [NAT] (Network Address Translation) it is effectively impossible for any computer elsewhere on the internet to initiate network connections to your machine. The only way other computers can transfer data to your PC is as ''response data'' to requests originating from your PC (e.g. sending back web pages you have requested). This provides excellent security; separate firewall software is therefore generally not needed. 
  
 The disadvantage of the use of [NAT] by the DSL-302G is that you can't run a webserver or other service on your PC and have other 
 people access it from the internet. Actually, you probably can by disabling [DHCP] on the DSL-302G, setting up a (private) static 
 address on your PC, then configuring the [NAT] rules in the DSL-302G via the webserver at 10.1.1.1. Anyone who manages to get that 
-running is invited to record the process here! Of course if you do this, then you should consider configuring a firewall on your PC to handle the new accessability appropriately. 
+running is invited to record the process here! Of course if you do this, then you should consider configuring a firewall on your PC to handle the new accessibility appropriately. 
  
 Edit: by Doug Hawkins (doug@lga.net.nz) 
 You can run a webserver off this modem because I have done so (also on a [ADSL] connection with a dynamic [IP] (thanks to http://no-ip.com). Search the Dlink site for a [PDF] manual called "DSL-302G_Open.ports_and_DMZ.pdf". (or email me and I will flick you the [PDF]) 
-The open port connects to my linux box (FedoraCore 3) that serves the webserver. I had to run through a proxy server to locally view the pages on my other PC.<br> 
+The open port connects to my Linux box (FedoraCore 3) that serves the webserver. I had to run through a proxy server to locally view the pages on my other PC.<br> 
 A link for the above is http://www.dlink.com.au/tech/drivers/files/modems/DSL-302G_Open.ports_DMZ.zip 
  
+Edit: by Ivo Keel  
+There is one thing missing, at least for xtra.co.nz users: Port forwarding or open ports does not work with Firefox. That is what I found out after hours of unsuccessful tries, all bounced with "Method not implemented". It has to be Internet Explorer. But that does not need to pose an impediment for Linux users. An easy way to install IE6 for such purposes is provided by http://www.tatanka.com.br/ies4linux/page/Installation  
  
-Edit: additional by Chris Emery, UK: [NAT] stops all incoming connections by default, but most routers, including this one, support a method called Port Forwarding ([NAPT]) which basically sets an instruction that certain ports are always referred to a certain machine (set a fixed [IP] address relative to the router for this to work!). Port Forwarding allows a firewall to be selectively opened up, so for example, remote admin ports wouldnt reach your PC but web serving ports (8080?) would. 
+Edit: additional by Chris Emery, UK: [NAT] stops all incoming connections by default, but most routers, including this one, support a method called Port Forwarding ([NAPT]) which basically sets an instruction that certain ports are always referred to a certain machine (set a fixed [IP] address relative to the router for this to work!). Port Forwarding allows a firewall to be selectively opened up, so for example, remote admin ports wouldn't reach your PC but web serving ports (8080?) would. 
  
 Edit by Leslie Katz, Australia: 
 Following the instructions contained in the D-Link document referred to by Doug Hawkins (while using Internet Explorer) meant that I could open certain ports that I wanted to open. However, the document was a bit cryptic. Points four and five did not mention that it is necessary to do more than merely click on "Submit" when you've finished creating your NAT rule if you want it to be permanent. In that event, you must, after clicking on "Submit", go to "Admin", then to "Save & Reboot" and then click on "Save". Also, I wanted to open three contiguous ports and found that I could do so in a single rule by putting the number of the lowest port in "Destination Port From", the number of the highest port in "Destination Port To" and a zero in "Local Port". 
  
@@ -134,13 +139,13 @@
 </verbatim> 
  
 To configure half bridge mode via the [HTTP] interface: 
  
-# Point your web brower (eg Mozilla) to the "Network Address Translation ([NAT]) Configuration" page ([WAN] -> [NAT]) 
+# Point your web browser (e.g. Mozilla) to the "Network Address Translation ([NAT]) Configuration" page ([WAN] -> [NAT]) 
 # Select Disable [NAT] and Click Submit 
 # Navigate to the Save and Reboot page and save the new configuration. 
  
-It is recomended to reset the 302g to default settings and re-entering your [ISP] login information before trying this or it may not work. 
+It is recommended to reset the 302g to default settings and re-enter your [ISP] login information before trying this or it may not work. 
  
 This mode does seem a little flaky in that once the [PPP] connection is up it doesn't seem to like it if you try to gain a second lease (even from the same computer). Renewing an existing lease is fine however. So for example if your computer turns off or reboots you may need to power cycle the [DSL] modem as well in order to get a lease again. [YMMV]. 
  
 If you are having problems with the default lease expiry time of 1 minute being to short (a common problem with some broadband routers) or causing occasional drop outs on lease renewal, then to increase the lease time enter telnet mode and type the following commands: 
@@ -151,9 +156,9 @@
 commit 
 reboot 
 </verbatim> 
  
-This example sets the DHCP lease to 30 minutes, with a Maximum lease of one hour. If your ISP changes you IP address frequently you may want to experiment with shorter values. 
+This example sets the DHCP lease to 30 minutes, with a Maximum lease of one hour. If your ISP changes your IP address frequently you may want to experiment with shorter values. 
  
 Please Also Note: If you purchased the modem in NZ chances are it will have an NZ firmware, modern NZ firmwares will not allow the modem to operate in half-bridge mode, it is possible to use the firmware from the [support page for the DSL-302G | http://www.dlink.com.au/tech/drivers/files/modems/dsl302g.htm] on the [Australian d-link site | http://dlink.com.au] and just change the VCI/VPI settings to 0/100 and half-bridge mode will work. 
  
 Edited by Franc Zabkar (fzabkar@internode.on.net): 
@@ -163,8 +168,37 @@
  
 The routine has been tested on an Optus supplied modem. Certain parameters such as timezone_combo may need to be customised by the user. Self explanatory instructions are included within the body of the code. 
  
 All corrections and improvements gratefully received. 
+  
+  
+! How to keep the clock accurate using SNTP  
+(stolen from http://www.sarguide.co.uk/sntp.php) ... and added timezone setting  
+  
+''You will probably find that if you turn off your router that it looses the time that you had set. Also, you may find that the router just looses time gradually, meaning that alarms etc are not really that accurate.  
+Thanks to Oliver Broad for this.  
+''  
+  
+''You can keep the time accurate using SNTP (Simple Network Time Protocol). All you need to know is the address of an SNTP server. In this example i have used ntp2b.mcc.ac.uk  
+''  
+  
+''Log into the CLI and put in the following commands, pressing enter after each line:  
+''  
+  
+<verbatim>  
+create sntp servaddr dname ntp2b.mcc.ac.uk  
+modify system timezone "NZST"  
+modify sntp cfg enable  
+get sntp stats  
+</verbatim>  
+  
+''The first line creates an entry telling the router the address of the SNTP server. The second line sets the timezone. The third line enables SNTP on the router, and the fourth will give you the status of SNTP so you can check it has worked.  
+''  
+  
+''The router will then check periodically and update it's time so that it is always accurate. It checks every 15 minutes (I think!!)  
+''  
+  
+I have done the above on my 302G with success although after rebooting the time is as per the last SAVE operation until the link comes up and the time is automatically sync'd (however the UPTIME reported on the SYSTEM page is correct)  
  
 ! Changing HTTP and Telnet Ports 
 If in half-bridge mode (or full-bridge) any attempts on port 80 or 23 on the external IP address if you have external access disabled in the 302g will refuse the connection. This is troublesome if you want port 80 or 23 to be sent to the router like all the rest of the ports for a web server. Changing the ports is done in the CLI via Telnet using the following commands: