LinuxQuestions.org
Visit Jeremy's Blog.
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 11-24-2005, 10:46 PM   #1
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Rep: Reputation: 15
router issue (accessing local webserver)


my router is a debian box with dual NICs, routing to eth0 from the internet on eth1 using iptables


i have a webserver running on 192.168.1.5 on port 6080. When i request http://domain:6080 from within the same LAN as the webserver, I get connection refused. When I connect to http://192.168.1.5:6080 within the LAN, it works perfectly.
When someone outside the network requests http://domain:6080, it works fine.

I am currently using my super-unstable linksys router until I can resolve this, so that I can put the linux box back in.

yay for you guys!


edit: this happens with all ports that are accessed from within the LAN via the domain, so I need this issue to be resolved for all ports (although I suppose any fix would fix that)

Last edited by FliesLikeABrick; 11-24-2005 at 10:47 PM.
 
Old 11-25-2005, 06:50 AM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
When you do http://domain/server from the inside you will be getting the outside address as a dns response. So an inside device will be attempting to access the outside interface address. I don't know for sure if this is the issue but some routers will not allow it. You will probably need to use a static host entry if you really want to resolve the name. Is it really a biggy?
 
Old 11-25-2005, 10:57 AM   #3
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
yes it is a biggy. I could live with it, but there are 3 other people in this house who use that server for hosting things(sites, images), and they wouldn't understand why it has always worked and now doesnt.

What is this about a static host entry? I wouldn't mind going an extra step or two to make this work
 
Old 11-25-2005, 11:41 AM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
if you check out /etc/hosts its a file for manually entering hostnames. IP should theoretically check the hosts file first before attemting a DNS resolution, so if you stick an entry in it pointing your domain name at the internal address it should sort you out. You do need to do it on each of your workstations tho...

Its also possible that you need an IP tables entry specifically allowing traffic sourced from your internal network destined to the external address, that might also sort it.
 
Old 11-25-2005, 11:43 AM   #5
FliesLikeABrick
Member
 
Registered: Aug 2005
Location: NY,USA
Distribution: Debian, Gentoo, Ubuntu
Posts: 103

Original Poster
Rep: Reputation: 15
the iptables solution sounds better, because then i could route the traffic to different computers internally depending on what port, right?

I actually run 2 webservers in the LAN, and it sounds like the static host file entry would route all requests to the domain from within the LAN to that one box, whereas with the iptables entry I'd be able to specify ports.

Is this the correct impression?
 
  


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
Timeout Error When accessing WebServer LinuxStart Linux - Networking 2 07-09-2005 05:18 PM
Local webserver -- How to deny all client install their local web server--Please help b:z Linux - Networking 13 04-16-2005 07:11 PM
IPTABLES and local Webserver mpgram Linux - Security 4 05-06-2004 12:11 PM
Problem accessing webserver when using iptable. Sheridan1977 Linux - Security 7 04-28-2004 06:16 PM
newbie setting up lan - can't see local webserver. nmoog Linux - Networking 1 03-27-2004 11:17 PM

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

All times are GMT -5. The time now is 08:16 AM.

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