Jump to content

Dns Question


unlnvlslble

Recommended Posts

After watching the episodes about DNS, I decided to go head on and move my web server to my house and setup a record on zone edit and have everything point to my house rather than to a hosting provider. That way I can control everything and save a boatload of money.

The only problem I'm having is that I can't access my site from the house anymore.

I'm not 100% sure how to word the question so if I sound like I'm not making sense feel free to let me know.

My web server is at 192.168.1.123. I have my router configured to forward port 80 to that IP and it works just fine outside my network. When I'm at home and I type in www.mysite.com it goes to the website but not everything is linked properly. If I click one of the links on the page it redirects me like its going to my router rather than to the web server.

What I think is happening is that when I go to www.mysite.com it is going from my pc to my router, out to the name servers, gets pointed back to my router and me being on the same network, I get pointed to port 80 on the router rather than getting sent through NAT to the server.

Am I making sense? If so how would I fix this?

If it helps I'm running wordpress on a LAMP configured Ubuntu 10.10 server behind an asus router running dd-wrt. Thanks for any help!

Link to comment
Share on other sites

That doesn't make sense. Assuming your site uses exclusively relative links, it's up to your browser to add on the pre-fix. Unless your browser is been forwarded to your routers page, it should just use the domain as it's pre-fix ( the editor says: this sentence could be phrased with more technical accuracy).

Some routers don't apply port forwarding rules to requests that come form the LAN, but that does not appear to be the problem in this case. As a quick fix you can just add your domain to your hosts file and enter the internal IP address of the server.

Link to comment
Share on other sites

Thanks I think I figured it out. You said "Unless your browser is been forwarded to your routers page" and that made me think of how exactly I was connecting.

I was using a browser that was proxied through an ssh tunnel to my home router and something weird was happening there. If I browse to the page from another box on the network it works just fine. I don't know why I get this problem when using the tunnel but not on the local network. I thought it would work exactly the same.

Link to comment
Share on other sites

If your webserver is running inside your network, I don't see any reason to why you can't access your files.

Are you able to access your website from outside your network?

Link to comment
Share on other sites

My ISP blocks incoming port 80 connections, so I have to run Apache on port 80. Its probably against your TOS to host a webserver at home, so dont be surprised if you get caught doing it.

Is there any other port that is not being blocked by your ISP? Because if there is you could change Apaches default port to that.

Link to comment
Share on other sites

I believe you're having the same issue I faced. When accessing anything at my public ip address. My dsl replies to it. Unfortunately it doesn't have an option to change that. Which is kind of frustrating, but fixable. Just add your website to your host file. add something like "192.168.1.123 www.mywebsite.com" to your hosts file. Kind of an ugly hack. But it works.

[edit]Oops didn't read the last line of Sparda's post.

Edited by GeekGoneCrazy
Link to comment
Share on other sites

Is there any other port that is not being blocked by your ISP? Because if there is you could change Apaches default port to that.

Yeah I use port 3000. 80 and 25 seem to be the only blocked ports. FTP and SSH still work fine. I still run my Apache server on port 80, I just have my router forward port 3000 to my server at port 80.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...