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

From Yggenyk
Jump to navigation Jump to search

<google>ENGELSK</google> 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.

  1. Select the Services Tab
  2. In the Services Tab select the Hotspot Tab
  3. Under SMTP Redirect select Enabled
  4. Set SMTP Destination IP to the ip address of your SMTP server
  5. Set SMTP Source Network to your Source Network Address.

SMTP Destination IP

The ip address of your SMTP server can be found using nslookup. In a command prompt type: nslookup <name of SMTP server>

C:>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

Like in this example there will often be more than one ip address related to the name of your SMTP server. Just pick one of them, they all work.

SMTP Source Network

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
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.
Another example:
10.10.10.1 Router address
255.255.0.0 Subnet mask
10.10.0.0 Source Network Address


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).

<google>ENGELSK</google>

id=siteTree