Link to home
Start Free TrialLog in
Avatar of ReneGe
ReneGeFlag for Canada

asked on

DD-WRT Access to LAN ressources

Hi there,

-The website is locally hosted on the LAN, which is available from the Internet
-From the LAN and using a web browser,  I enter the FQDN of that website
-The packets goes to the default gateway, most likely out on the Internet but don't come back to the LAN.  So therefore, from the LAN, I am unable to access the website.

I remember, a few years ago, I enabled something (I think it was a simple check box but not sure) in DD-WRT that was making the packets route back to the LAN were I was able to see a locally hosted website from the LAN.  But I don't remember how I did this.

Thanks for your help,

Cheers,
Rene
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

You need a rule for hairpin NAT. Some DD-WRT firmware don't have it enabled by default.

Add this to your iptables rules:
iptables -t nat -I POSTROUTING -o br0 -s 192.168.1.0/24 -d 192.168.1.0/24 -j MASQUERADE

Open in new window

Obviously, change 192.168.1.0/24 to your internal IP class.

LE: or you can update DD-WRT to a newer version.

HTH,
Dan
Avatar of ReneGe

ASKER

Hi Dan,

Thanks for your prompt reply and sorry for taking so long.

Here is the version I use:
Firmware: DD-WRT v24SP2-MULTI (09/27/12) std

When you make reference to updating the firmware, does this includes mine, and how would that help me to resolve this need?

Can you please tell me how do I run this command line? Is it by adding a cron job?

Also, I find that it does not work and causes problems for whatever reason, should i just disable that cron job?

Thanks and cheers,
Rene
ASKER CERTIFIED SOLUTION
Avatar of Dan Craciun
Dan Craciun
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ReneGe

ASKER

By disabling NAT redirection; will the ports i setup uo to be forwarded through NAT port forwarding still work?

Thanks
You're not disabling NAT redirection.
Filter WAN NAT Redirection Prevents hosts on LAN from using WAN address of router to contact servers on the LAN (which have been configured using port redirection)
Meaning it disables hairpin NAT.
Avatar of ReneGe

ASKER

Hi Dan,

Sorry for the late response.

I sill did not have a chance to try your solution.  I'll accept it and if I have more questions, I'll let you know.

Thanks and cheers,
Rene