View previous topic :: View next topic |
Author |
Message |
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Wed May 10, 2006 5:31 pm Post subject: [SOLVED] - No internal name resolution |
|
|
Hey everybody. I have an interesting problem that I can't quite seem to fix regarding internal name resolution.
I have a DSL line, which Qw(orst)est graciously offers me one whopping IP Address. I have a craptastic Actiontec DSL modem, with a single Ethernet out. I have a Wireless router, which then connects my 3 internal machines. My gentoo box runs named, hosts my domains, and other fun stuff.
More recently to having Qworst for ISP service, I had another ISP that granted me 2 IP's. The setup then was great. I had an external IP for the DSL modem, and a second external IP for my wireless router, and everything was great. Things would resolve inside or outside.
Now comes the problem. Since I only have one IP, and I don't wan to double-NAT, the DSL modem gets the external IP. It also is the gateway for my internal network (192.168.0.x.) Everything else, the wireless router, and my 3 computers are all on the same 0.x subnet, using the DSL modem as the gateway. I can get out to the internet fine, and DNS has been updated with my new IP for the website and all that, and people can access my websites from outside no problem.
The problem is, I can't resolve the names of any of my servers INSIDE the network. If I try to access my gentoo box via samba (hostname enterprise) my XP machine can't find it named as such, I have to use the internal IP of the box (192.168.0.2)
My external IP is 67.40.87.xxx - if I try to access that IP from inside, I get the setup for the DSL router (like I typed in 192.168.0.1) - I'm guessing that since it doesn't leave the internal network, it doesn't get a chance to get forwarded to the gentoo machine.
So, I know what the problem is, but how can I fix it? I don't want to change all my settings to access my webpages/email depending on whether I'm at home or not. What did I miss?
Thanks in advance. _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil
Last edited by Crymson on Sun May 14, 2006 3:10 pm; edited 1 time in total |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
Posted: Wed May 10, 2006 6:54 pm Post subject: |
|
|
Hi.
You can give the router the external ip and setting the dsl modem
in transparent bridging. Then you have the same function as when:
Quote: |
More recently to having Qworst for ISP service, I had another ISP that granted me 2 IP's. The setup then was great. I had an external IP for the DSL modem, and a second external IP for my wireless router, and everything was great. Things would resolve inside or outside.
|
But you save one external ip for someone else
If it's a gt701 modeme it should work. |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Wed May 10, 2006 8:13 pm Post subject: Still no joy |
|
|
Ok, let's see if I got this right.
Put the GT701 in Transparent Bridging mode. No problem.
Then, I'll need to authenticate with the ISP via the wireless router, right? It gives me the option to get an IP via PPPoE, but I use PPPoA (not sure if qwest will let us get away with using PPPoE forever.)
Even when I did that, the DSL modem never authenticated, so I never got online.
Perhaps I can do something with Unnumbered/VIP mode? I'm not too clear on what those 2 options do for me. _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
Posted: Wed May 10, 2006 9:20 pm Post subject: |
|
|
Yep, you got it right.
But it may be a problem if the router don't support the autentication.
Maybe if you give us the type of modem an router, someone may
have some idea. |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Wed May 10, 2006 9:43 pm Post subject: |
|
|
Ok, sorry about that.
I'm not at home right this second, but the DSL modem is an Actiontec GT701, the Wireless router is a D-Link DI-524.
I'll edit this post with the revision numbers when I get home.
Thanks for the suggestion though. _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
Posted: Wed May 10, 2006 10:43 pm Post subject: |
|
|
Ok.
That's not god. You can't use it in bridge mode as the router not supports
the connection. So one thing to do is to setup the modem as normal.
Give the modem's lan port the lan-ip of 192.168.0.1 and change the router ip
to 192.168.1.1.
Now connect the modem lan-port to one of the switch ports on the router.
You use the settings in the modem for portforward and so on.
One problem with this may be that the router is handling connections
between the wired and the wireless section as a form of bridge, dependent
on the ip setting of the router. But normaly it should work on layer 1-2 and
use the hardware adresses.
Or you may hack the system in the dlink (think it run on embedded Linux) to implement pppoa |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Wed May 10, 2006 11:35 pm Post subject: |
|
|
I tried that originally - but that's double NAT, and nothing would get through to my server... maybe I did it wrong.
One question though -
If everything is behind the Dlink, 192.168.x - then how can a port forward on the modem 192.168.0.x reach it? It would need to be forwarded twice wouldn't it?
As I stated in my original post, this is exactly how I had it set up before, except the router had a public IP, rather than a private IP only.
Just not sure how I can do this with one IP...
does it cause a big security problem if I put the router in the DMZ of the modem, and do the port forwarding from the router? _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Thu May 11, 2006 12:02 am Post subject: |
|
|
Ok, put the router in the DMZ of the modem, and I get the same problem.
Whenever I try to access my website, I get the stupid setup screen for the DSL modem. Why won't it forward requests that it receives from inside the network? The only way I can access my stuff is if I type in the internal IP address of my web server.
The same goes for network access - only by IP, not by name.
Of course, I also just managed to screw up the DLink... I forwarded port 80 to my server, like I should have for when requests come from the modem... and now I can't access the web setup for the router... so the router does what I want the modem to do, and vice versa.
ARRRRRRGH this is annoying. _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
Posted: Thu May 11, 2006 6:59 am Post subject: |
|
|
Yep.
This is a problem with this 'home' router's.
Quote: |
If everything is behind the Dlink, 192.168.x - then how can a port forward on the modem 192.168.0.x reach it? It would need to be forwarded twice wouldn't it?
|
Se if I can explain what i mean.
If you setup the modem as normal and give it the 192.168.0.1 adress then this is your gateway.
Now connect the lan-port of the modem to one of the switch ports (NOT the wan-port on the d-link)
By setting the ip on the d-link to 192.168.1.0 you put it out of the net. The d-link is running like a
switch after the modem. You also need to disable the dhcp server in the d-link.
So you don't use the functions in the d-link it just acts like a switch.
The problem is that the link between the wired an wireless ports on the d-link
may us a type of level 2-3 switch.
So chematic it look like this.
atm-line-------modem--------switch------lan
You have 192.168.0.2 on your computer. Now try to reach the 192.168.0.1 and the modem
should answer.
The importen thing is that you DON'T use the wan port on the d-link. |
|
Back to top |
|
|
Aurisor Guru
Joined: 20 Sep 2003 Posts: 361 Location: Boston MA
|
Posted: Thu May 11, 2006 1:34 pm Post subject: |
|
|
I know you're trying to do things the right way and all, and I respect that, but wouldn't it be a lot easier to just put the domains in the host files of your machines? If your home network is anything like mine, you probably don't have a lot of named machines and they don't change that often.
Just a thought. |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Fri May 12, 2006 5:50 pm Post subject: |
|
|
Ok, problem solved. I was actually doing what you suggested and using the D-Link as a switch.
Here's what I ended up doing.
1) The reason I couldn't resolve anything internally is because Samba was using the old, incorrect IP. Fixed that, made sure everything was in the same workgroup, and it began working.
2) Regarding the IP Addresses. I created separate zome files for my domains. If the request is coming from an INTERNAL IP, then it will answer with the internal IP address of the machine. If the request is coming from an EXTERNAL IP, it answers with the external IP address (at which point the port forwarding works as it should.)
In order to get the nameservers to work, on my connection in my Winbloz machine, I put 192.168.0.2 as my primary DNS (internal IP of the gentoo box) and I put 209.145.192.20 (an external DNS server) as the secondary. This accomplishes what I want. Internal resolution with the gentoo box first, and if I'm outside the network, it uses secondary DNS, and resolves outside the network.
The architecture is setup like this:
ATM -> DSL modem -> LAN port on D-Link -> All other machines.
All port forwarding is handled by the DSL modem, and DHCP is enabled on the DSL modem, not the D-Link. This way, if people come on to my network via DHCP, the DSL modem will give out the proper DNS servers, and an appropriate IP address.
Talk about a big pain in the rear for something that should be pretty easy.
I'll post my named.conf and zone file here when I get home, for those who are having the same issue as myself.
Thanks for all your help you guys!! _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Fri May 12, 2006 6:03 pm Post subject: |
|
|
Now here's a stupid question... now that I've solved the problem, I want to change the topic name to [SOLVED] etc... how do I do that? I don't see an option... _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
keyson l33t
Joined: 10 Jun 2003 Posts: 830 Location: Sweden
|
Posted: Fri May 12, 2006 8:04 pm Post subject: |
|
|
If you press edit on the first post, you may edit the topic. (I think). |
|
Back to top |
|
|
Crymson Apprentice
Joined: 21 Mar 2004 Posts: 203 Location: New England
|
Posted: Sun May 14, 2006 3:18 pm Post subject: |
|
|
Hehe, sweet deal thanks. And thanks again for all your earlier help.
As promised, here are my internal and external zone files.
crymson.org (External zone file)
Code: |
; Zone file for Crymson.Org
$TTL 3D
@ IN SOA ns.crymson.org. hostmaster.crymson.org. (
2005120101 ; serial
4H ; refresh
16M ; retry
1W ; expiry
1D ) ; minimum
;
TXT "Crymson.Org, Our Heads A Splode"
NS ns
MX 10 mail.crymson.org. ; Primary Mail Exchanger
;
crymson.org. IN A 67.40.87.xxx
localhost IN A 127.0.0.1
loopback IN CNAME localhost
ns IN A 67.40.87.xxx
www IN CNAME ns
mail IN CNAME ns
ftp IN CNAME ns
webmail IN CNAME ns
forums IN CNAME ns
moonscape IN CNAME ns
|
Internal zone file for crymson.org
Code: |
; Zone file for Crymson.Org
$TTL 3D
@ IN SOA ns.crymson.org. hostmaster.crymson.org. (
2006051001 ; serial
4H ; refresh
16M ; retry
1W ; expiry
1D ) ; minimum
;
TXT "Crymson.Org, Our Heads A Splode"
NS ns
MX 10 mail.crymson.org. ; Primary Mail Exchanger
;
crymson.org. IN A 192.168.0.2
localhost IN A 127.0.0.1
loopback IN CNAME localhost
ns IN A 192.168.0.2
www IN CNAME ns
mail IN CNAME ns
ftp IN CNAME ns
webmail IN CNAME ns
forums IN CNAME ns
moonscape IN CNAME ns
|
Exactly the same file, except one has the public IP, the other has the internal IP.
In order to get these to actually work, make the following change to your named.conf file, save, and restart the service. Ensure you changed the serial numbers of the zone files, and do an rndc reload.
Code: |
view "internal" {
match-clients { localnets; };
zone "crymson.org" {
type master;
file "pri/crymson.org.int";
};
zone "brewingthunder.org" {
type master;
file "pri/brewingthunder.org.int";
};
};
view "external" {
match-clients { any; };
zone "." {
type hint;
file "named.ca";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "pri/127.zone";
};
zone "crymson.org" {
type master;
file "pri/crymson.org";
};
zone "87.40.67.in-addr.arpa" {
type master;
file "pri/87.40.67.zone";
};
zone "seconday.com" {
type slave;
file "sec/seconday.com";
masters { xx.xx.xx.xxx; };
};
};
|
Hope that helps anyone who is still having problems. _________________ Knowledge is Power // Power Corrupts // Study Hard // Be Evil |
|
Back to top |
|
|
|