OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of rene_ »
  • Show Posts »
  • Topics
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

  • Messages
  • Topics
  • Attachments

Topics - rene_

Pages: [1]
1
Web Proxy Filtering and Caching / [TUTORIAL] Nginx as simple reverse proxy with web application firewall and SSL
« on: September 25, 2020, 09:02:11 pm »
Hello everyone,

as some of you requested this, I will write down, how I configured my Nginx, as a simple reverse Proxy (including HTTPS with letsencrypt, and Web Application Firewall enabled).


Step 1: Installation
You need to install the nginx and lets-encrypt plugins.

After that, configure you’re letsencrypt so that you get a valid SSL certificate for your service.
You need to use DNS-01 validation method, because nginx will use the port 80, and the lets-encrypt plugin is not able to use the modify the Nginx configuration for a successful validation.
When youre done, you can continue to Step 2.
(You can also use official paid certificates, if you have one, you need to import the CA, Cert and Key unter System → Trust)


Step 2: Configure Nginx

You need to be sure, that your OPNsense is not using port 80 or 443.
So you need to change the default port of your OPNsense webgui.
This can be done under “System → Settings → Administration”.
You also need to disable the HTTP Redirect.
Restart your firewall when done.

From now on, all steps are meant to configure under Services →Nginx → Configuration

2.1 Configure the upstream server

First of all, you need to configure your upstream server, this is the real server, where your web application runs on.
This could be any host on your LAN, DMZ or whatever.

To do so, navigate to Upstream → Upstream Server and click on the + in the right bottom corner.
Now enter a description, IP and port (80 – HTTP in most cases).
Use 1 as Server priority.

2.2 Configure the upstream

Next you need to configure the upstream, where you link your created upstream server.
You need to do that, because you could also configure multiple servers, for the same upstream for load balancing.
So what we configure, is a “load balancer” with just one host.

Therefore navigate to Upstream → Upstream and create one.
Chose a description, and link the upstream server you just created.
As load balancing algorithm, use weighted round robin.
Leave the rest as it is, if you don’t use HTTPS directly on your upstream server.


2.3 Configure the Location

As the next step, you need to configure the Location (URL) of your web application.
Navigate to HTTP(S) → Location and click on Add.
As URL Pattern, just use slash (/) and match type none.
URL rewriting should be nothing.
Define the Upstream server you created before and leave the rest as it is for now.

Later, you can configure the Web Application Firewall rule here.


2.4 Configure HTTP Server

The last step, to bring your web application online, is to configure the HTTP Server.
Navigate to HTTP(s) → HTTP Server and click on Add.
This should match your need in most cases:

HTTP Listen Port: 80
HTTPS Listen Port: 443
Server Name: The URL your applications listens to (for example: cloud.domain.com)
Locations: the location created in step 2.3
URL Rewriting: Nothing selected
TLS Certificate: The issued Lets-Encrypt or imported certificate for this host

Leave the rest as it is for now.

2.5 Apply changes
When your done, click on General Settings and then on Apply
Your nginx should now be ready to server your web application.
Be sure to have correct firewall rules (from wan to this device, port 80 & 443)


This tutorial is not finished yet, i will explain some steps more detailed and attach some screenshots the next days.
Hope this is helpful :-)

2
Web Proxy Filtering and Caching / NGINX Reverse Proxy - Upload performance [Nextcloud]
« on: March 16, 2020, 11:48:17 am »
Hello everyone,

i am currently trying to setup a nextcloud behind the Nginx reverse proxy of opnsense.

So far so good, i set everything up, the rewrites are working, SSL is working, and i can access the cloud from lan and wan.

But when i upload a file to my cloud, its not faster then about 1MB/s (over lan).

On the cloud vm i can see, that there is no continuously incoming traffic (from the firewall), mor there are peaks at about 90mbit/s ever 2-3 seconds.

What could that be?

Already tried allot of settings in the nginx configs.

Currenlty enabled http2 on both sides, and sendfile in the nginx global settings and the vhost.

Kind regards,
René

3
Hardware and Performance / OPNsense 20.1 on RaspberryPI 3
« on: November 05, 2019, 11:16:59 am »
Hello all,

with OPNsense 20.1, FreeBSD12.1 will be the base system.

Within FreeBSD12.1 the RaspberryPI3 Board is fully supported by BSD.

Further also OPNsense is running on the pi3.

Download site: https://opnsense.rene.network/
(Please don't mirror files!)
PLEASE KEEP IN MIND:
  • this is not an official OPNsense release, so there is no official support for this image!
  • theres no update functionality at the moment!
  • this is a git build, there will be bugs!
  • this is the not yet released 20.1

Whats working
  • it boots
  • onboard lan adapter
  • usb2lan adapters
  • usb wifi adapters
  • Grow rootfs on boot
  • HDMI Output and usb keyboard

Whats not working:
  • onboard Wifi is still not supported by FreeBSD
  • Power off causes a reboot (reported by @monstermania)
  • Firewall LiveView
  • ...


Not confirmed:
  • ...


All the best,
René

4
Development and Code Review / Build from scratch / Port to ARM
« on: October 03, 2019, 04:19:25 pm »
Hello all :-)

i am currently still running pfSense on most of my devices  :(

i already migrated the first virtual appliance (kvm) from pfsense to opnsense, and i have to say ... i love it  ;D


In my home office i am using a Netgate SG3100.

Sadly i found out, that opnsense is still not supported on arm SoC's, so i decided to build it on my own.

I have all the files here, u-boot, dts files and so on, thanks god, the SG3100 is an armeda385 board, which is supported by bsd since 2015.

i successfully build the kernel and the base, but at the moment, i am wondering, if i need to "make ports" or if its optional?

I am asking, cause the build already takes 10 hours on my build VM (10 Cores and 12GB Ram)

All the best,
René

Pages: [1]
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2