0

I am in process of migrating an existing wordpress site that is currently hosted offsite to an on site ubunutu server. The new server is accessable via an internal IP address, 192.168.4.176, but not accessable via an external IP address, 209.2.xxx.xxx. The external port is forwarded to the internal ip and I can see the requests via tcptrack but the site does not load, I just get connection reset, I have the server firewall turned off and the ports.conf file, I believe, is set up correctly to accept external requests:

    Listen 80

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Thanks in advance!

Darren

  • What do you have in settings->general->Site Address and WP address? – JackTheKnife Sep 21 '17 at 17:33
  • 192.168.4.176 in both, I tried the external ip address but no luck. – DarrenMcGettigan Sep 21 '17 at 17:37
  • That is why you see it when loaded via local IP. Other way I will go with 1:1 NAT not port forwarding or even DMZ to see if your WP site is configured properly. Also you don't have a domain name assigned to the external IP? – JackTheKnife Sep 21 '17 at 17:40
  • The hosted site is still being used, so I was getting our server up and running before we point the domain name to the url. Can you elaborate on the "1:1 NAT not port forwarding or even DMZ"? – DarrenMcGettigan Sep 21 '17 at 18:05
  • I just noticed, when trying to access the site using cell phone, outside of the network, I get the connect reset error, but I noticed the internal ip address, 192.168.4.176. in the title bar. – DarrenMcGettigan Sep 21 '17 at 18:21

2 Answers2

0

Based on your description you need to have updated Site Address and Wordpress address in the Settings/General with your external IP. Personally I will prefer to use proper domain name and spoof your host file with it to that external IP and set your new hosting machine (Apache) as a vhost with that domain.

Then you need to run some SQL queries to update DB

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Where oldurl is your internal IP and newulr is your external IP.

Regarding DMZ and 1:1 NAT - that is up to your firewall configuration (if it is a hardware or a software firewall).

Here you have good explanation regarding DMZ: What is DMZ in networking?

In that case your web server will be connecting directly to the internet with external IP

Here you have good explanation regarding 1:1 NAT: https://wiki.untangle.com/index.php/1:1_NAT

In that case your web server will be connecting to the internet via external IP using your local machine IP which will be mapped to that external on the firewall level.

JackTheKnife
  • 3,795
  • 8
  • 57
  • 117
0

Ok, so it turns out the site accessable via the external IP address, when trying to access using my cell phone nothing came up but when I got home and used my pc viola. Thanks for the help!