LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-18-2005, 06:43 AM   #1
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Rep: Reputation: 30
Reverse DNS


hi, im running apache with virtual servers. When i try and goto one of my virtual servers from another workstation in my house it forwards me directly to my router. I think this is a problem with reverse DNS, my router not allowing loopback or something.

How would i configure this to work correctly ?

Thanks in advance

Regards, Ben.
 
Old 04-18-2005, 07:48 AM   #2
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
>> When i try and goto one of my virtual servers from another workstation in my house

I assume what you mean is... whenever you type in 192.168.x.x from inside your house, you're not seeing a webpage on your server??

>>it forwards me directly to my router

Can you clarify here? What do you see? The router's config page?

I don't think it's reverse DNS related. Most probably it's apache config related. Maybe you need to post your httpd.conf so we can see how you're doing everything.
 
Old 04-18-2005, 07:53 AM   #3
Brian Knoblauch
Member
 
Registered: Jan 2005
Distribution: OpenSuse Tumbleweed
Posts: 288

Rep: Reputation: 39
You need to setup separate zones. You're getting the outside IP on the lookup, which points to the router. Whatever router you're using isn't smart enough to realize what's going on. If you setup your DNS server to return the local addresses for your domain to local machines, then you avoid the problem. Or, you can buy a different router :-) I have a Netgear FVS318 that will reroute such requests in a transparent manner.
 
Old 04-18-2005, 08:35 AM   #4
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
when i goto for example mail.mydomain.com the lookup goes outside my network to lookup the IP then it comes back into my network and is ment to goto my server. The problem accures when it tries to come back into my webserver because i think my router cannot handle lookback requests so it brings me up my router config page instead of forwarding the request onto my server. when i type in my server ip it comes up with my localhost virtual server (as expected).

Now you said it i think it might be a router problem! can anyone give me any advice ?

Regards, Ben
 
Old 04-18-2005, 09:22 AM   #5
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
think we need to know more about your network config.

-could be a client problem:
-> tell your browser not to use a proxy when connecting to LAN-IPīs,....

- DNS-server problem
- verify /etc/hosts
- NAT-problem?!
 
Old 04-18-2005, 09:25 AM   #6
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
Ok, it might be a client problem. My browser does not use a proxy as im not running one.
How would it be DNS-server problems? im not running a DNS-server.
do u mean the hosts file on my server? because my clients are windows machines.
How do you mean a NAT problem?

Thanks,
 
Old 04-19-2005, 01:48 AM   #7
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
Quote:
Originally posted by Snerkel
[B]Ok, it might be a client problem. My browser does not use a proxy as im not running one.
How would it be DNS-server problems? im not running a DNS-server.
hi ben,
something must do the name-resolution....dns-server or local host(s)-file or wins or....
what happens if you enter the ip-address of your website?

is the problem only when you trying to connect via hostname?
 
Old 04-19-2005, 01:53 AM   #8
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
besides, please post the virtualhost-section of your httpd.conf!
 
Old 04-19-2005, 02:11 AM   #9
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
Brian Knoblauch is on the money - pretty sure it's a shortcoming of your router - i've had this happen on a few ADSL routers with port forwarding enabled, myself - specifically Netcomm and DLINK routers.

I guess the logic is that port forwarding is a postrouting rule (like the iptables policy). The router see's the connection as being 'local', and establishes the connection on the LAN interface as it's 'more direct'. As there's no port forwarding rules on this interface to apply to the traffic postrouting, you just get a plain old connection to the routers GUI. Makes sense, but also doesn't - just my stab in the dark.

Maybe you'd be better off setting up a local zone file (or /etc/hosts entry) for the domain or host and pointing the record to your internal interface, or get your DNS provider to setup a 'view' so it resolves locally from your host (if they're running bind9, anyway).

If you get really stuck, try having your routers web interface listen on a high port (like 8080 or something) and port forward LAN/tcp/80 back to your web server, the same way as you're doing on the WAN interface...

Last edited by angrybeaver; 04-19-2005 at 02:20 AM.
 
Old 04-19-2005, 07:00 AM   #10
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
If you're going to be serious about running servers out of your home, you might want to get serious about buying a decent router. I recommend one that supports 1 to 1 NAT so that you can map your external IP addresses to local (192.168.x.x) Ip addresses on your LAN. This will simplify the whole thing and it will allow you to get a decent (stateful) firewall that will better protect your machines.

The experts say that you should never try to take on the burden of running servers from your own house. I did it myself, and they scoffed at me the whole time. I thought I was going to be the exception to the rule. Well, I was, but now that I've colocated my machines to a real datacenter, I can see the light now and I should have been listening to them all along.

You should plan to colocate your machines to a real datacenter for a variety of reasons that I won't go into here. But the bottom line is... by getting a decent router, you can stand a much better chance of setting all this up easily in your house and when you're ready to colocate the machines to a datacenter, you can send the router along with the machines to be sure your installation will be easy.

The above scenario is exactly what I have just finished doing over the last month. The router I'm using is a SonicWALL TZ170 which ran me about $500, but was definitely worth the money if you're serious about running your own servers. Doing anything less is really a hack job in my opinion. I also recommend searching around for a different model router that supports 1-1 NAT. I'm sure there are others available that can do this but will be a more realistic price. I just happened to have the money, so I didn't mind spending it.
 
Old 04-19-2005, 11:52 AM   #11
Snerkel
Member
 
Registered: Jul 2004
Location: England
Distribution: 1 Gentoo 2005.0 system(desktop), 1 hardened-gentoo SeLinux stage1 server ;)
Posts: 262

Original Poster
Rep: Reputation: 30
donboy: Cheers mate that was a nice read. ive got a few questions tho.

Quote:
colocate your machines to a real datacenter
What do you mean by that? Do you mean just running my own servers but in a decent (proper) place?

Quote:
I recommend one that supports 1 to 1 NAT
What is 1 to 1 NAT ? And when you say "map your external IP addresses" do you mean external IP addresses i have assigned to my WAN connection? or IP addresses from other people connecting to my LAN?

Thanks again,
 
Old 04-19-2005, 12:25 PM   #12
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
>> Do you mean just running my own servers but in a decent (proper) place?

Yes. Like you're paying a datacenter "monthly rent" to have your machines running on their internet connection and in their building. This gives you excellent resources like fire supression, heat control, cleaner environment, multiple internet connections in case one goes out, multiple generators so power isn't a problem.

1 to 1 NAT is a feature supported by some professional-grade routers. The feature will let you specify that all traffic coming from a certain external IP address (eg 66.92.204.251 for example) shall be directed to an internal IP (eg 192.168.0.10) on your LAN. This overcomes the problem of port forwarding. For example, lets say you have 2 servers and both of them are running apache. Well, you can't selectively forward port 80 traffic to either machine. Port forwarding requires that all traffic on port 80 is forwarded to ONE of your 2 machines. So by using 1 to 1 NAT, you can forward everything from an outside IP to an internal IP on your LAN.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No reverse DNS??? DragonM15 Linux - Networking 5 11-22-2005 12:06 AM
Reverse DNS Webbie Linux - Networking 4 10-10-2005 07:49 PM
reverse DNS in C? Thinking Programming 3 04-27-2005 12:05 PM
Reverse DNS davespink Linux - Networking 2 02-27-2005 06:44 PM
Reverse DNS Pyro2k4 Linux - Networking 8 09-06-2004 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration