Loopback behind Modem

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
atruskie
DD-WRT Novice


Joined: 07 Nov 2010
Posts: 1

PostPosted: Sun Nov 07, 2010 6:42    Post subject: Loopback behind Modem Reply with quote
Hi all,

My setup is:

ADSL 2+ modem - Dynalink RTA1320 - Does not support loopback, WAN IP (example): 123.123.123.123, Internal IP: 192.168.1.1, DMZ: 192.168.1.2

Connected to Asus RT-N16 running DD-WRT v24-SP2 (14896) - WAN IP: 192.168.1.2, internal IP: 10.0.0.1

Connected to web server: 10.0.0.254
and to file server: 10.0.0.253

I have already setup DnsMasq to route requests to my domain to the webserver (adress=/mydomain.com/10.0.0.254). However, I now have several domain names and managing them is a little trickier.

I would like for DD-WRT to reroute any outgoing request to my internet WAN IP (123.123.123.123) back to itself (so port forwards can take effect) without going to the adsl modem.

I think this is different from normal loopback behavior because that normally just uses one device...

Is this possible?
Cheers
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sun Nov 07, 2010 7:13    Post subject: Re: Loopback behind Modem Reply with quote
atruskie wrote:
I would like for DD-WRT to reroute any outgoing request to my internet WAN IP (123.123.123.123) back to itself (so port forwards can take effect) without going to the adsl modem.

It's not that simple, you have to NAT to the final destination:port not the router itself.

iptables -t nat -I PREROUTING -p [tcp|udp] -d [WAN IP] --dport [port] -j DNAT --to [LAN IP]:[port]

http://www.dd-wrt.com/wiki/index.php/Iptables

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum