LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Closed Thread
  Search this Thread
Old 07-10-2016, 02:22 PM   #1
crazyeddie740
Member
 
Registered: May 2004
Location: Sedalia, MO
Distribution: Debian, Mandrake
Posts: 71

Rep: Reputation: 15
Domain Name behind a NAT firewall with Dynamic DNS


It looks like I struck out in the Networking forum, so I'll try my luck here.

I'm in the process of setting up a web server and site on my home network. I'll eventually migrate the site off to a hosted server, but for now, I'm setting up the site on my home network until we can get it set up the way we want.

I'm in the process of getting a Dynamic DNS set up. My plan is to have the Dynamic DNS point to the router (there does appear to be a Dynamic DNS client built into the router), and then port forward from there to the server.

The hostname of the server is currently set to something other than the domainname-to-be. I've just set it to a static IP for the local network (192.168.0.2).

Before I set the server to a static IP, I installed WordPress and phpBB. Right now, the login link on WordPress is pointing to 192.168.0.104 - the dynamic IP the server was assigned before I reset it to the static IP.

My guess is that I need to set up the domain name on the server, and then reinstall WordPress and phpBB. Hopefully, that'll get things like WordPress's login link to point to mydomain.com/login and not 192.168.0.2/login or 192.168.0.104/login. (The later option is not exactly optimal for people wanting to use the site from outside of my home network. The former option still won't work until the Dynamic DNS fairies have sprinkled their fairy dust, but should work once those fairies have done their magic...)

I'm not sure how to configure the domain name on the server. The information my google-fu brought up is a bit confusing, and it looks like the exact magic spells you have to recite vary from distro to distro. I'm currently running Debian Stretch.
 
Old 07-10-2016, 05:16 PM   #2
af7567
Member
 
Registered: Nov 2012
Posts: 295

Rep: Reputation: 106Reputation: 106
The IP address your webserver is listening on shouldn't have anything to do with wordpress or phpbb. If you can still access the website at 192.168.0.104 then your system network settings aren't using the static IP address you set.

Can you also access the website via 192.168.0.2?
Did you set the static IP on your router or in your debian network settings?

After you have port forwarding set up correctly and dyndns, you will probably find that the dyndns URL just works. The stuff before the "/login" in the URL will just stay as whatever you typed into your web browser.
 
Old 07-12-2016, 03:51 PM   #3
crazyeddie740
Member
 
Registered: May 2004
Location: Sedalia, MO
Distribution: Debian, Mandrake
Posts: 71

Original Poster
Rep: Reputation: 15
I do have port forwarding set up on the router. Correctly or not? Who can say. Dynamic DNS has not been set up yet. (Still trying to get my domain name registrar to switch over the name servers.)

I set the static IP (192.168.0.2) on the server, in the range of address reserved for that purpose on the router. I forwarded the ports to that static ip address.

I can access the website via the local network at the .2 address. The login link on .2's wordpress page is still pointing to 192.168.0.104/wp-login.php.

Strangely enough, I did get a "Welcome to nginx on Debian!" page when brought up .104, but I checked, and that IP has been reassigned... to the laptop I'm writing this post on. I'll have to check and see what that's all about...

When I bring up my home's public ip (over the local network), I get .2's webpage. The login link is still pointing to 192.168.0.104/wp-login.php.

I've turned off the wifi on my phone and attempted to bring up my home's public IP over the data connection... and I'm getting absolutely nothing. So either my ISP is blocking incoming http or I didn't set up the port forwarding correctly? BoingBoing came up just fine, so my data plan didn't just suddenly stop working.

At any rate, just for my information, how do domain names usually get set on Debian? Because based on how wordpress is acting, I'm guessing that when I installed and configured it, it went to look at where the host's domain name is normally stored, and wrote down whatever was there. Which in this case was that 192.168.0.104 temporary IP address.

Also, you say that Dynamic DNS might automagically take care of this problem. In that case, would it matter if the client is on the router or on the server? I can't think why it would, but I'll ask anyway, just to be on the safe side.
 
Old 07-12-2016, 04:00 PM   #4
crazyeddie740
Member
 
Registered: May 2004
Location: Sedalia, MO
Distribution: Debian, Mandrake
Posts: 71

Original Poster
Rep: Reputation: 15
Okay, tried tethering my laptop to my phone, and bringing up my home network's public IP over that connection. I got the page title up in the tab, and a "Waiting for 192.168.0.104" message.

I have double checked on my router, and the ports are being forwarded to .2, not .104.
 
Old 07-12-2016, 04:02 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Portchecker.
 
Old 07-12-2016, 04:03 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



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
Domain Name behind a NAT firewall with Dynamic DNS crazyeddie740 Linux - Networking 8 07-14-2016 08:32 PM
Dynamic DNS and Best Domain registerer mlinuxk Linux - Networking 3 09-15-2012 01:55 AM
firewall using dynamic dns for inbound connections ptah_be Linux - Security 8 02-06-2006 03:44 AM
Dynamic DNS and stale firewall lookups socom Linux - Networking 2 02-28-2004 08:21 PM
DNS, Domain, dynamic IP... Are these are just 25 cent words? MasterC General 8 06-01-2003 10:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:00 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