OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: Nf00038 on October 09, 2019, 11:11:10 pm

Title: Moodle
Post by: Nf00038 on October 09, 2019, 11:11:10 pm
Hello,

I would like to request some help in being able to access Moodle application from outside my home network. For instance, customers from their home need to be able to connect to Moodle which is an XAMPP application hosted on a server within my local area network.

To do this, the data packets need to travel over the public internet, via my firewall, through WAN interface to LlAN interface and onto my server.

I have configured rules as follows - please see attached images.

I would like the application to use port 8181 over the internet, to be mapped to another port internally.

I have managed to get the configuration working on a home router previously however I have difficulty with OPNsense firewall.

I have a firewall, router and tp link switch installed.

Best,

Neil

Title: Re: Moodle
Post by: fabian on October 09, 2019, 11:28:12 pm
you can in theory solve that with a port forward as well on OPNsense but I would not recommend it.

Install nginx or haproxy and configure it to be used for simple load balancing with a single upstream. Then you have multiple advantages:

* Generate certificates for TLS (HTTPS) with Let's Encrypt directly via the OPNsense (and support TLS without configuring it on the backend)
* You can have multiple domains behind the port 80
Title: Re: Moodle
Post by: Nf00038 on October 10, 2019, 12:57:11 am
That’s great, thank you.

I have followed the instructions here - https://docs.opnsense.org/manual/how-tos/haproxy.html

Seem to have got lost in the instructions regarding ACLs - seems to refer to actions, however I can only find conditions and rules, and public services. Presumably this is the same thing, any help on the configuration of ACLs, actions and the frontend would be appreciated.

Best wishes,

Neil
Title: Re: Moodle
Post by: Nf00038 on October 10, 2019, 12:51:00 pm
Hello,

Would be grateful if someone could walk me through the configuration?

I have followed all the steps however internet traffic is still not reaching the Moodle application.

I do have a VPN hosted by ZeroTier installed.

Best,

Neil
Title: Re: Moodle
Post by: Nf00038 on October 10, 2019, 03:30:48 pm
For further clarification:

First, I would like HTTP traffic to travel via my VPN and External WAN - 82.16.43.55

Second, OPNsense to convert external WAN to LAN IP 192.168.1.1

Third, OPNsense to transfer traffic to 192.168.1.100

The port I am using externally and internally is 8181.

I would like to be able to type 82.16.43.55:8181/moodle and for my web application to work.