WordPress behind Firewall and Public IP

I have a Wordpress jumpox installed on a VMWare server with a local ip (192.168.95.51) assigned to the Jumpbox. In my firewall, I have the internal IP mapped to the external ip of 69.16.150.242 on our firewall. The Wordpress homepage comes up partially but not completely when accessed from the Internet because WordPress is not aware of the Public IP. A proxy server setting seems to be the only option I have here but wondering if there are any other options/solutions.

WordPress behind Firewall and Public IP

DNS control is not necessarily required as you can control name resolution with a "hosts" file as shown here:

http://codex.wordpress.org/User:Westi/Hosting_WordPress_Behind_NAT

Though that is clearly not convenient if you have a large number of internal users.

Austin

WordPress behind Firewall and Public IP

You can make WordPress available through a NAT to either external users or internal users. You can make it available to both in the case that you can control DNS for your internal users separately from your external users.

Is it not possible for you to assign a static (internal) IP to your WordPress JumpBox?

Austin

I have currently assigned an

I have currently assigned an internal static ip of 192.168.95.51. I have created a firewall NAT rule to provide access from the Internet to the internal static IP via 69.16.150.242. This configuration allows access to a portion of the page that displays the top menu bar. You can see this if you open your browser and go to http://69.16.150.242

WordPress behind Firewall and Public IP

Well, if you have a registration key, I would start by disabling the JumpBox navigation bar.

Then we can work out the other things. Oh, and you set the static IP using the JumpBox Administration page as show here right?

http://www.jumpbox.com/docs/setstaticip

Austin

Yes, I have a registration

Yes, I have a registration key and it is applied. I just followed the instructions for disabling the jumpbox navigation bar. A static IP address 192.168.95.51 has been assigned to the Jumpbox.

WordPress behind Firewall and Public IP

Ok, now in WordPress, log in as the admin user, then go to the "Settings" Page (link near top right). Now in the following fields:

  • WordPress address (URL)
  • Blog address (URL)

change the IP to your external IP, leaving the rest of the URL untouched.

Austin

Thank you Austin. That

Thank you Austin. That worked!!!!

WordPress behind Firewall and Public IP

Wait, I am confused. The JumpBox itself will still have an internal but static IP address. Setting the WordPress IP address as I suggested above is just a configuration setting that effects how WordPress writes it URLs. This is all just an ugly work around necessitated by WordPress writing out absolute URLs in all of its HTML. The change I recommend above has the following effect, it will take URLs currently generated by WordPress that look like this for you now:

href="http://192.168.95.51/wordpress/wp-content/themes/default/style.css"

and make them:

href="http://69.16.150.242/wordpress/wp-content/themes/default/style.css"

Thats all, it just changes the strings rendered so external users can see it correctly. Does that make sense or am I missing something?

Austin

So to answer your question

So to answer your question "yes, an internal static IP". My question to you is can NAT work?
i.e. Internet > 69.16.150.242 > Firewall NAT to internal address > Local Machine (Jump Box 192.168.95.51)

If I have read the other

If I have read the other discussions regarding wordpress correctly, it can either be used internally or externally but not both. Correct?

WordPress behind Firewall and Public IP

This is likely to be the case. The problem is, WordPress writes the hostname into many of its URLs, notably stylesheets and that sort of thing. We can try some things though and see if they work for you.

The first step is to make sure you have the JumpBox configured to use a static IP. This should keep the JumpBox from updating the IP address in WordPress itself. Now, if you just wanted to fix it for external users, you could replace the internal IP address with the public IP address in the WordPress General Settings page (log into wordpress as admin, click settings on the top right hand side). Using the fully qualified domain name there should also work.

If you could make the FQDN resolve to the internal IP for only your internal users, they could see the same thing external users see. In some environments this is not possible and in inconvenient most.

Austin

Thank you the response

Thank you the response Austin. From a security perspective, having the JumpBox configured with the Public IP directly could be bad if a hacker got control of it. What is your recommendation for NATing a public IP to an internal IP assigned to the JumpBox?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.