What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Little help to setup my rt-n66u for my home network

zib

New Around Here
Hello everyone,

After solving an issue with my dns setup, I am running into a new problem.

Small background: I have a router/internet box provided by my isp which is way too limited for what I want to have (not possible to have dhcp reservations, dns entries etc...) so I am using the box as a gateway and as dns server as well. my rt-n66u is used as dhcp server (dhcp server disabled on the gateway).
Everything works like a charm so far.

The problem comes with my nas which I totaly forgot!

I have a subdomain of some website pointing to my ip external ip address which i redirect to the nas. everything works as normal when I am connecting to the nas from the external world. when I try to connect to the same exact domain, my box blocks the traffic, so I have to use the local ip address and not the domain name which is unhandy.

I would like to re-enable that but for that, I have to use my rt-n66u as dns server, the internet box as gateway, and I also need to use the router to update my ip with some kind of dyndns service.

I know the addresses of the dns servers of my isp.
So is it possible to configure dnsmask in such a way that it can hadle the dns requests although the rt-n66u is not the gateway ?
is it possible to use the lan interface (bridge ?) as internet connection and not the wan interface ?
is it possible to configure dnsmask as dns server although the router is not the gateway ?

Looking forward to your replies,

Thanks,
zib
 
So is it possible to configure dnsmask in such a way that it can hadle the dns requests although the rt-n66u is not the gateway ?
Yes, that's the usual configuration. Your setup is not normal. Unless I am misunderstanding you.
is it possible to use the lan interface (bridge ?) as internet connection and not the wan interface ?
Yes, but why would you want to?
is it possible to configure dnsmask as dns server although the router is not the gateway ?
Yes, same question as above.
 
Last edited:
Ideally you would put you ISP's "internet box" into "modem-only" or "bridge" mode and then let the RT-N66U do everything, firewall, dns, dhcp, etc.
 
Thanks for your replies,

So here is a small picture of my current network
test.png

the router is not connect to the network via wan but via the lan interface. that is the reason why it should access the internet via this interface (cron job running in the background to update my ip for my sub-domain)

and would like to keep my box in my network to access files and other stuff on the tv

does that clarifies my situation ?
 
OK. So all you have to do is

1) Setup the RT-N66U in its default "router mode".

2) Ignore the WAN port and connect it to your ISP box from LAN port to LAN port (as you have already done).

3) Turn off DHCP server on ISP box (as you have already done). You can turn off its DNS if you want to.

4) On the RT-N66U,

WAN > Internet Connection > Enable WAN = No
WAN > Internet Connection > Redirect to error page = Never
LAN > LAN IP = Set correct values
LAN > DHCP Server > Default Gateway = IP of your ISP box
LAN > DHCP Server > DNS Server = Your ISP's DNS server (only one)

Try that and see if it works.

The only problem with this setup that I can think of is that you will not be able to resolve local host names via DNS, although NETBIOS name resolution should still work.

If you want to resolve local hosts names as well you will have to leave "LAN > DHCP Server > DNS Server" blank (so that clients use the local DNS server) and create a custom dnsmasq.conf file.

UPDATE: Thinking about it, you might not need to create a custom dnsmasq.conf file. Try setting WAN > Internet Connection > Connect to DNS Server automatically = No and putting your ISP's DNS servers in WAN > Internet Connection > DNS Server1 & 2.
 
Last edited:
Thanks you for your reply!

So I'v tried the configuration and ... so far, no success

My router is in "router mode" and connected to the isp router via lan, there is nothing connected to the wan!

on the rt-n66u, I disabled the WAN and set the redirection to error page to "never"
I also set my isp dns servers but it does not seem to do anything

my lan ip of the server is correct, the gateway as well and for now, the dns is the gateway, idealy it should be the rt-n66u

by the way, I can' find "WAN > Internet Connection > Connect to DNS Server automatically = No"
I'm using asuswrt-merlin 374.43

I use to have a custom dnsmasq.conf to setup correctly the dns server, I removed it of course but no success there either ...

If i connect to the router via ssh and just try a stupid ping to google.com, it returns "bad address" so it basicaly can't connect to the external world!

So first, how should I configure the router so it can access to external ip without any wan connection ?
once this is achieved, how should I configure dnsmasq so that i can the router as dns to resolv my local name and especially to over-rule my subdomain.

Thanks!
 
OK zib, I think I've got it now.

WAN > Internet Connection > WAN Connection Type = Auto
WAN > Internet Connection > Enable WAN = No
WAN > Internet Connection > Redirect to error page = Never

WAN > Internet Connection > Connect to DNS Server automatically = No
WAN > Internet Connection > DNS Server1 = You ISPs 1st DNS server
WAN > Internet Connection > DNS Server1 = You ISPs 2nd DNS server

LAN > LAN IP = Set correct values

LAN > DHCP Server > Default Gateway = IP of your ISP box
LAN > DHCP Server > DNS Server = (leave empty)

[reboot]

ssh onto the n66u and type this command:

# ip route add default via 192.168.x.y

where 192.168.x.y is the address of your ISP box

# nslookup google.com

If that works you will have to create a little script that adds the ip route command automatically at boot time.
 
Thanks for this last answer,

In the mean time I tried a couple of things to understand a little bit better how network interfaces and routes are setup and I found the solution a bit earlier than your reply but it is the esact same one. appart from the ip is fixed but that does not matter (I guess) and the dns of the lan server is set to the router itself.

so the solution was to indicate the dns in the wan so resolv.conf has correct nameservers and add the default gateway in the routes so the internet traffic can go out!

side question: is it ok to add the wan interface (eth0) to the bridge (br0) so I can use it as lan port too ? or would that f**k up the router or webinterface ?
 
A simple solution might be putting the rt-n66u right after the isp router and putting a smart switch where you have the rt-n66u in your diagram. Everything will be in the same address space, dhcp, dns then. Smart switches are dirt cheap now. Just make sure the rt-n66u isn't using the same lan base as the isp router is. If one is 192.168.1.1 the other has to be 192.168.0.1 or something different than the isp modems ip range.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top