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

From Yggenyk
Jump to: navigation, search

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

Non-authoritative answer:
Name:    vip.cybercity.dk

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 and your subnet mask is your SMTP Source Network is You can find your routers ip and subnet mask in the Setup tab.
Another example: Router address Subnet mask 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).