Accessing a website Via an Internal IP Address

Discussion in 'General' started by Indieben, Mar 28, 2018.

  1. Indieben

    Indieben Member

    Hi, so I should point out that this is a phpbb board:
    People need to be able to access this:

    1) From www.website.com
    2) From the easiest IP address possible.

    Number (2) is currently the issue.

    From a search around these boards (I may have missed something), most people only use the IP address to test the website before attaching a domain to it. This project is one, like my others, that I am doing for free. It's to connect my local estate (very close proximity tower block) to the phpbb board that I have set up, where many cannot afford an internet connection.

    So, I am using OpenWRT, a Forum Wifi has been set up that any one of 312 people can access (signal permitting). The forum wifi deliberately does not have a password. It is therefore essential that the firewall on OpenWRT forwards people on the wifi, to the bulletin board. People must not be able to access any other sections of my LAN.

    That aside, here's the main question; how do I arrange this kind of access in terms of an "internal web address" without the need for the forumwifi user to be able to access the internet and slow my internet down? I think there may also need to be consideration of cookies on PHPBB and the internal address masquerading as the original website address so that the board works properly.

    Also, If anybody knows how I set up the firewall on OpenWRT to forward users automatically to the web address (that is question 1 of course) without allowing them access to the wider internet or any other area of my network, i'll love you forever!

    Thanks :)
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    I believe this question has nothing to do with ISPConfig.
    My advice is set up a network for those WiFI users, and you probably have this already if the WiFI is working. Then routing set up so from WiFI network only the PHPBB server is accessible.
    Sorry, I do not know much about this so can not give more details. But my advise is to ask on some routing or network setup forum about this.
     
  3. ahrasis

    ahrasis Active Member

    If your webserver is on ip 192.168.0.123, simply establish your board in /var/www/html so it can be accessed from that ip internally.
     
  4. Indieben

    Indieben Member

    Hi Taleman, it does, the primary issue is working out how to access my website hosted on ispconfig through an internal address, taking into account PHPBB and it's ways and also the tech i have at my disposal in terms of trying to give creative space to people replying :)
     
  5. Indieben

    Indieben Member

    Hmmm? Websites on ISPConfig are, by default in that location - my question is about how to access the website internally?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Actually, it does not matter for the setup of a website if it's on an internal or on an external IP. When a server is behind a router, then the router translates the external to the internal IP, on the web server you use the internal IP then for the website or just use *. The DNS records points to the external IP.
     
  7. Indieben

    Indieben Member

    So Till, are you saying that I don't need to actually do anything other than find the correct internal address for the website? I ended up with this link https://192.168.1.110/var/www/website.org.uk/web/index.html but:

    phpbb is installed and that takes me to "the requested page cannot be found" within phpbb (so nearly there) but it isn't hitting the index.php page afresh in the same way as if a visitor accessed it from the web, sure i can then hit home on phpbb and then attempt to login but is there a neater way please? The overarching objective, is to find a clean internal link that behaves in exactly the same way as using the outside url does to get to the php bulletin board.

    The other thing is, I keep getting this insecure warning in my browser - I don't have a certificate installed or anything but then I have no clue how to do an internal one and i've never been able to get letsencrypt working but that's another story....
     
    Last edited: Mar 28, 2018
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to access the website with it's domain name. When you point the domain to the external IP in DNS and forward that IP in your router to the internal IP, then you will be able to access the website by it*s domain name from outside. For access from inside (in case your router does not allow access to the external IP from inside), you can either set the internal Ip + domain name in the hosts file on your desktop (works on windows, mac, and Linux) or you assign the internal IP insted of *to the site and enter just the internal Ip in the browser, but that way you can host only one website per IP address.
     
  9. ahrasis

    ahrasis Active Member

    ISPConfig website or control panel? ISPConfig control panel is normally on port 8080 in /usr/loca/ispconfig/interface/web and you can access it with via 192.168.0.110:8080 locally.

    In /var/www/html normally you have apache or nginx html which you can use to put your board so that you may access it via 192.168.0.110 or use its subdirectory like /var/www/html/yourboard and access it from you ip like 192.168.0.110/yourboard.

    If you are using ISPConfig to create a website from within the control panel, you will not have access to it via your ip since the website will be in /var/www/yourdomain/web. You can definitely try to symlink it to /var/www/html (command "mv /var/www/html /var/www/htmlbak; ln -s /var/www/yourdomain/web /var/www/html") but I haven't tested this.

    I am not sure how you get the link your mentioned above to work but for phpmyadmin, you can have it access via 192.168.0.110:8080/phpmyadmin / 192.168.0.110:8081/phpmyadmin (nginx) if you followed the available guides / tutorials in here.

    For internal IP, you can only use self-signed SSL certs but for your board domain, you can try LE SSL certs. As stated by @till, change the hosts file of your (and other users) desktop in order to access the board via domain name locally should work fine.
     
  10. Indieben

    Indieben Member

    Meh, totally confused :) Just to reitterate, (sorry I put PHPmyadmin instead of PHPBB before), i have a guest wifi setup with the intention of giving a maximum of 310 people access to my PHPBB, there is no way that I can configure their desktops for them and nor would they want me to. The whole idea is to avoid them having to have an internet connection to use the board and to not have them use my internet and take up bandwidth.

    Because these people would be connecting to the guest wifi on the same LAN as ispconfig is installed on, they would need to be forwarded to an internal address and not an external web address (that would take up bandwidth). I do have other websites running on ispconfig, i need to keep them running as normal.

    the PHPBB needs to be accessible externally by it's normal website address and also internally. Hopefully this explains things a little more clearly. Thanks :)
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    add an additional internal Ip to your server. This should be no problem as these are your own private IP addresses. Then add this Ip addressin ISPConfig under System > server IP and select this IP in the website settings in ISPconfig. Your users can then accessthe website by using that IP. Let's say this additional IP is 1.2.3.4, then your users just enter http://1.2.3.4 in their browser (or https).
     
  12. Indieben

    Indieben Member

    Thanks Till, I set up that IP address using "post-up ip addr add 192.168.1.120/24 dev eth0" under the netmask line within the etc/network interface, and added it to ispconfig where you said, but, alas, no joy. I also notice that, although it definitely applied, it does not list it for editing within the GUI - where does it go please? Maybe i've used an IP that i've accidentally assigned for something else or maybe there is something else wrong :) I tried to go to http://192.168.1.120 - just to no avail.
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you missed enabling the HTTP name virtual host checkbox in the IP settings?
     
  14. Indieben

    Indieben Member

  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look what you selected in the headline. When you choose to get only ip addresses listed that are not for websites, then an ip for a website won't get listed there of course. and you must have added an IP in ISPConfig.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    and as you can see in your first screenshot, you are trying to add a duplicate ip.
     
  17. Indieben

    Indieben Member

    Sorry Till, I don't understand :) Like, i've already added it as you will see from the other screenshots because I can't add it again :)
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Someone else might explain it to you then.
     
  19. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Delete the filters from the list view and the IP will show up.
     
  20. Indieben

    Indieben Member

    Woops thanks! OK so a change of IP address has led me in the right direction, now I get squirrelmail when i go to 192.168.1.137! If I knew I was going that way I would have got some nuts...no, it's me going that way!
     

Share This Page