DD-WRT: Difference between revisions

From Yggenyk
Jump to navigation Jump to search
No edit summary
 
(44 intermediate revisions by the same user not shown)
Line 2: Line 2:
[[Category:Internettet]]
[[Category:Internettet]]
[[Category:Internet]]
[[Category:Internet]]
<google>ENGELSK</google>
==DD-WRT==
DD-WRT is an opensource linux based firmware for Linksys WRT54G and similar 802.11g wireless routers.
DD-WRT is an opensource linux based firmware for Linksys WRT54G and similar 802.11g wireless routers.
* [http://www.dd-wrt.com Homepage og DD-WRT]
* [http://www.dd-wrt.com Homepage og DD-WRT]
* [http://www.dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F What is DD-WRT]
* [http://www.dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F What is DD-WRT]
* [http://www.dd-wrt.com/wiki/index.php/Supported_Devices List of Supported Hardware]
* [[VPN|Using VPN with DD-WRT]]
* [[VPN|Using VPN with DD-WRT]]


Line 12: Line 15:
Wiviz, an open source GPL project, allows you to use your WRT to see other networks. It scans for networks and then shows signal strength and effects of antenna adjustment in real time.
Wiviz, an open source GPL project, allows you to use your WRT to see other networks. It scans for networks and then shows signal strength and effects of antenna adjustment in real time.
* [http://www.dd-wrt.com/wiki/index.php/Wiviz Wiwiz]
* [http://www.dd-wrt.com/wiki/index.php/Wiviz Wiwiz]
==Let DD-WRT redirect SMTP traffic to a valid SMTP server so everyone on your net can send mail no matter what SMTP server their mail program uses==
==Redirect all SMTP traffic to your internet providers SMTP server==
DD-WRT has an feature thet let's everyone on your network be able to send mail, no matter what SMTP server their mail program is set up to use.
[[Let DD-WRT redirect SMTP traffic to a valid SMTP server so everyone on your net can send mail]]


# Select the '''Services Tab'''
==Use DD-WRT Router as WiFi Range Extender==
# In the Services Tab select the '''Hotspot''' Tab
* [http://www.dd-wrt.com/wiki/index.php/Repeater_Bridge DD-WRT wiki mainpage / Linking Routers / Repeater Bridge]
# Under '''SMTP Redirect select Enabled'''
# Set '''SMTP Destination IP''' to the ip address of your SMTP server
# Set '''SMTP Source Network''' to your Source Network Address.
 
The ip address of your SMTP server can be found using nslookup. In a command prompt type: nslookup <name of SMTP server>
nslookup vip.cybercity.dk
Server:  DD-WRT
Address: 192.168.0.1
Non-authoritative answer:
Name:    vip.cybercity.dk
Addresses:  212.242.41.51
          212.242.41.50
          212.242.41.36
          212.242.41.35
          212.242.41.34
 
You find the Source Network Address by making a bitwise AND between your routers LAN address and your LAN's subnet mask. In most cases (when the only numbers in the Subnet Mask is 222's and 0's this is done by taking the routers address and replace the numbers where the subnet mask is 0 with 0<br>
If your routers address is 192.168.10.1 and your subnet mask is 255.255.255.0 your '''SMTP Source Network''' is 192.168.10.0. You can find your routers ip and subnet mask in the '''Setup''' tab.<br>
Another example:<br>
10.10.10.1 Router address<br>
255.255.0.0 Subnet mask<br>
10.10.0.0 Source Network Address<br>
 
 
The only restriction is that the SMTP server the mail clients are pointing at actually exists, and can be looked up with on a DNS server. This will normally be the case unless they have entered some random name (so remember to use a real server name if you want to verify it is working after configuring the router).


==How DD-WRT routes traffic==
==How DD-WRT routes traffic==
Line 73: Line 50:
==Virtual Interfaces multiple SSID's==
==Virtual Interfaces multiple SSID's==
* [http://www.wi-fiplanet.com/tutorials/article.php/3714521 Implementing Inexpensive Multiple SSID Networks]
* [http://www.wi-fiplanet.com/tutorials/article.php/3714521 Implementing Inexpensive Multiple SSID Networks]
* [http://www.dotkam.com/2008/10/02/configure-multiple-ssids-with-one-router/ Configure Multiple SSIDs with One Router]
==Wireless Access Point==
====Do a hard reset on the router====
# Connect the router directly (to avoid conflicts with other stuff on your network) to one of the switch ports on the router (not the WAN port)
# Connect to the router '''http://192.168.1.1'''
# Chose a username and password, and login to the router
====Go to the '''Setup - Basic Setup''' tab====
# Set '''WAN Connection Type''' to '''Disabled'''
# Check '''Assign WAN Port to Switch''' (visible only when WAN Connection Type is set to Disabled)
# Set '''Local IP Address''' to 192.168.1.2 or something that fits your existing network different from primary router and out of your DHCP pool
# Set '''Subnet Mask''' to 255.255.255.0 or whatever you use on your network
# Set '''DHCP Server''' to  '''Disable'''
# Uncheck '''Use DNSMasq for DHCP'''
# Set '''Gateway''' to 192.168.1.2 or whatever your local gateway is  (NTP Client and many things will fail without this)
# Set '''Local DNS''' IP address of primary router (NTP Client and many things will fail without this)
# '''Save'''
====Go to '''Setup - Advanced Routing''' tab====
# Set '''Operating Mode''' to '''Router'''
# '''Save'''
====Go to '''Wireless - Basic Settings''' tab====
# Enter the name of your wireless network in '''Wireless Network Name (SSID)'''
# Set '''Wireless Channel''' to '''Auto'''
# '''(Optional) Sensitivity Range: The max distance (in meters) to clients x2'''
# '''Save'''
====Go to '''Wireless - Wireless Security''' tab====
Note: Security is optional, but recommended! Clients must support whatever mode you select here.
# Set '''Security Mode''' to '''WPA2 Personal Mixed'''
# Set '''WPA Algorithm''' to '''TKIP+AES'''
# Enter the password for your network in '''WPA Shared Key''' (at least 8 characters)
# '''Save'''
====Go to '''Services - Services''' tab====
# Set '''DNSMasq''' to '''Disale'''
# Set '''ttraff Daemon''' to '''Disable'''
# '''Save'''
====Go to '''Open the Security - Firewall''' tab====
# Uncheck all boxes except '''Filter Multicast'''
# '''Save'''
# Set '''SPI firewall'' to '''Disable'''
# '''Save'''
====Go to '''Administration - Management''' tab====
'''(Recommended) Info Site Password Protection: Enable'''
# Set '''Routing''' to '''Disabled'''
# '''Apply Settings'''
# Connect Ethernet cable to main router you can use the WAN connection, or any of the LAN ports
* [http://www.dd-wrt.com/wiki/index.php/Wireless_Access_Point Set up your router as Wireless Access Point]
==WI-FI How fast can it be==
* [https://www.lifewire.com/how-fast-is-a-wifi-network-816543 How Fast Is a Wi-Fi Network?]
==Extend the range of your wireless network==
====Commercial antenna====
* [http://www.tp-link.com/en/products/prodetail.aspx?mid=0103030106&id=539 2.4GHz 24dBi Grid Parabolic Antenna TL-ANT2424B]
* [http://www.tp-link.com/en/products/prodetail.aspx?mid=0103030106&id=2574 Pigtail Cable TL-ANT24PT]
* [http://www.buffalotech.com/products/wireless/wireless-accessories/pigtail-adapter-for-outdoor-antennas/ Pigtail Adapter for Outdoor Antennas WLE-LNC] MC to N-Type Female adapter
====Do it yourself antenna====
* [http://en.wikipedia.org/wiki/Cantenna Cantenna - Wikipedia]
* [http://www.turnpoint.net/wireless/cantennahowto.html How To Build A Tin Can Waveguide WiFi Antenna]
* [http://people.wallawalla.edu/~Rob.Frohne/Airport/Primestar/Primestar.html Tin Cantenna with a satellite dish as an IEEE 802.11 Wireless Networking Antenna]
* [http://www.oreillynet.com/cs/weblog/view/wlg/448 Antenna on the Cheap (er, Chip)]
* [http://www.makeuseof.com/tag/how-to-make-a-wifi-antenna-out-of-a-pringles-can-nb/ How To Make A WiFi Antenna Out of A Pringles Can]
* [http://www.yggenyk.dk/wiki/images/circular_waveguide_optimise.xls Spreadsheet for optimum can size calculation]]
* [http://www.qsl.net/n1bwt/contents.htm The W1GHZ Online Microwave Antenna Book]
====WDS (Wireless Distribution System) Repeater for range extension====
* [http://www.dlink.com/products/?pid=292 DWL-2100AP HIGH SPEED 2.4GHZ (802.11G) WIRELESS 108MBPS ACCESS POINT]
<google>ENGELSK</google>

Latest revision as of 07:05, 9 December 2022

<google>ENGELSK</google>

DD-WRT

DD-WRT is an opensource linux based firmware for Linksys WRT54G and similar 802.11g wireless routers.


Wiviz, an open source GPL project, allows you to use your WRT to see other networks. It scans for networks and then shows signal strength and effects of antenna adjustment in real time.

Redirect all SMTP traffic to your internet providers SMTP server

Let DD-WRT redirect SMTP traffic to a valid SMTP server so everyone on your net can send mail

Use DD-WRT Router as WiFi Range Extender

How DD-WRT routes traffic

To get a better understanding on how DD-WRT routes traffic, you can read:

If you are interested it tells how to show routing information:

To list your currently active rule-set: iptables -L

This command should list your currently active rule-set, and translate everything possible to a more readable form. For example, it will translate all the different ports according to the /etc/services file as well as DNS all the IP addresses to get DNS records instead. The latter can be a bit of a problem though. For example, it will try to resolve LAN IP addresses, i.e. 192.168.1.1, to something useful. 192.168.0.0/16 is a private range though and should not resolve to anything and the command will seem to hang while resolving the IP. To get around this problem we would do something like the following:

iptables -L -n

Another thing that might be interesting is to see a few statistics about each policy, rule and chain. We could get this by adding the verbose flag. It would then look something like this:

iptables -L -n -v

Don't forget that it is also possible to list the nat and mangle tables. This is done with the -t switch, like this:

iptables -L -t nat

There are also a few files that might be interesting to look at in the /proc file system. For example, it might be interesting to know what connections are currently in the conntrack table. This table contains all the different connections currently tracked and serves as a basic table so we always know what state a connection currently is in. This table can't be edited and even if it was possible, it would be a bad idea. To see the table you can run the following command:

cat /proc/net/ip_conntrack | less

The above command will show all currently tracked connections even though it might be a bit hard to understand everything.

Virtual Interfaces multiple SSID's

Wireless Access Point

Do a hard reset on the router

  1. Connect the router directly (to avoid conflicts with other stuff on your network) to one of the switch ports on the router (not the WAN port)
  2. Connect to the router http://192.168.1.1
  3. Chose a username and password, and login to the router

Go to the Setup - Basic Setup tab

  1. Set WAN Connection Type to Disabled
  2. Check Assign WAN Port to Switch (visible only when WAN Connection Type is set to Disabled)
  3. Set Local IP Address to 192.168.1.2 or something that fits your existing network different from primary router and out of your DHCP pool
  4. Set Subnet Mask to 255.255.255.0 or whatever you use on your network
  5. Set DHCP Server to Disable
  6. Uncheck Use DNSMasq for DHCP
  7. Set Gateway to 192.168.1.2 or whatever your local gateway is (NTP Client and many things will fail without this)
  8. Set Local DNS IP address of primary router (NTP Client and many things will fail without this)
  9. Save

Go to Setup - Advanced Routing tab

  1. Set Operating Mode to Router
  2. Save

Go to Wireless - Basic Settings tab

  1. Enter the name of your wireless network in Wireless Network Name (SSID)
  2. Set Wireless Channel to Auto
  3. (Optional) Sensitivity Range: The max distance (in meters) to clients x2
  4. Save

Go to Wireless - Wireless Security tab

Note: Security is optional, but recommended! Clients must support whatever mode you select here.

  1. Set Security Mode to WPA2 Personal Mixed
  2. Set WPA Algorithm to TKIP+AES
  3. Enter the password for your network in WPA Shared Key (at least 8 characters)
  4. Save

Go to Services - Services tab

  1. Set DNSMasq to Disale
  2. Set ttraff Daemon to Disable
  3. Save

Go to Open the Security - Firewall tab

  1. Uncheck all boxes except Filter Multicast
  2. Save
  3. Set SPI firewall to Disable'
  4. Save

Go to Administration - Management tab

(Recommended) Info Site Password Protection: Enable

  1. Set Routing to Disabled
  2. Apply Settings
  1. Connect Ethernet cable to main router you can use the WAN connection, or any of the LAN ports

WI-FI How fast can it be

Extend the range of your wireless network

Commercial antenna

Do it yourself antenna

WDS (Wireless Distribution System) Repeater for range extension

<google>ENGELSK</google>

id=siteTree