MyBB Community Forums

Full Version: How to set myBB forum to be accesible via LAN & WAN
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I manage to setup myBB forum on my local network(LAN). As a server, I'm using wampserver.

Setup on:
Board URL = http://*MY LAN-IP*:*OPEN PORT*/forum

Yes, the forum can be accessible from my PC and other computer in the LAN.

Now to make it accessible online:
Board URL = http://*MY WAN-IP*:*OPEN PORT*/forum

Yes, the forum can be accessible from other computer online (via other internet connection).

Now How I'm suppose to make both LAN & WAN accessible for this forum? How can I put 2 IP/address on Board URL?

Thanks.
I'm had to face a similar situation myself, but rather than using WampServer (not secure by default!), and rather than using open ports (does your ISP block port 80?), I am using a real and separate server, but it's on my LAN, so here is what I did to get it accessible via WAN and LAN IP addresses. You don't need to do anything to the server.

Set up the forums to use the WAN (it's "real") IP address. Then, on your Windows machine, edit your HOSTS file (location differs depending on Windows version) to redirect that WAN/domain name to your LAN IP address. It's honestly as simple as that, at least in a "normal" situation (which yours isn't). The HOSTS file is basically a local DNS. Windows will always look at the HOSTS file first, and if it doesn't find it there, it looks on the internet at real DNSs. The reason you have to do this is because most residential/home ISP routers lack NAT loopback. I am not sure if this method works with IP addresses. It should, but it may not. I redirect my domain name to my LAN IP address and it works flawlessly.

For example, if your domain is "www.mysite.com", and the WAN and LAN IP addresses were, respectively, 11.222.33.444 and 192.168.1.80, then you'd do this.

Quote:# Copyright © 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
192.168.1.80 www.mysite.com
192.168.1.80 mysite.com
192.168.1.80 11.222.33.444
That's my HOSTS file (from Windows 7), and besides the WAN and domain being changed, it works for me (that's actually my LAN IP of my server, but it's within a common LAN range, so it works for an example too).

You'd obviously just need the last one without any domain name (and adjust the first to be your LAN, and the second to be your WAN).

Since you're using ports, I am also not sure if this would work, or if you'd have to alter the method.

Lastly, this method works for me using a separate server on my LAN. I'm not sure if using the same local machine will add yet another complication. I'm not sure if redirecting your LAN IP address to localhost (127.0.0.1) will work.

However, redirecting from WAN to LAN can be done via the HOSTS file locally. There's alot of differences for you though from a "normal" case. This might not work, at least as is.