OPNsense Grundkonfiguration: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| (23 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
| Zeile 1: | Zeile 1: | ||
= OPNsense Grundkonfiguration – vom Werkszustand zu eigenen Netzen = | |||
* Animation: [https://xinux.org/opnsense-grundkonfiguration.html OPNsense-Grundkonfiguration] ([https://xinux.org/opnsense-grundkonfiguration-einfach.html einfach]), mit abgesicherter Verwaltung, WAN-Interface, eigenen Netzen, NAT ohne Zugriff auf fremde DMZs, Firewall-Regeln mit Alias, Weg zu anderen DMZs über eine eigene Route, Name und Zertifikat, Fehlerbilder | |||
=System: Settings: Administration= | =System: Settings: Administration= | ||
(x) Enable HTTP Strict Transport Security | (x) Enable HTTP Strict Transport Security | ||
TCP port 4444 | TCP port 4444 | ||
(x) Disable web GUI redirect rule | (x) Disable web GUI redirect rule | ||
(x) Disable DNS Rebinding Checks | (x) Disable DNS Rebinding Checks | ||
(x) Enable Secure Shell | (x) Enable Secure Shell | ||
(x) Permit root user login | (x) Permit root user login | ||
(x) Permit password login | (x) Permit password login | ||
SSH PORT 2222 | SSH PORT 2222 | ||
=System: Gateway: Configuration= | =System: Gateway: Configuration= | ||
WANGW 192.168. | WANGW 192.168.HS.254 | ||
Interface: WAN | Interface: WAN | ||
(x) Upstream Gateway | (x) Upstream Gateway | ||
| Zeile 17: | Zeile 21: | ||
( ) Block private networks | ( ) Block private networks | ||
IPv4 Configuration Type: Static IPv4 | IPv4 Configuration Type: Static IPv4 | ||
192.168. | 192.168.HS.2XX/24 | ||
GW: WANGW | GW: WANGW | ||
=Interfaces: Assignments= | =Interfaces: Assignments= | ||
em2: DMZ | em2: DMZ | ||
| Zeile 35: | Zeile 38: | ||
=Services: Dnsmasq DNS & DHCP= | =Services: Dnsmasq DNS & DHCP= | ||
DHCP Range: 172.17.2xx.100 bis 172.17.2xx.200 | DHCP Range: 172.17.2xx.100 bis 172.17.2xx.200 | ||
=Interfaces: | =Interfaces: LAN= | ||
Enable (x) | Enable (x) | ||
IPv4 Configuration Type: Static IPv4 | IPv4 Configuration Type: Static IPv4 | ||
IPv4 address: 172.17.2xx.1/24 | IPv4 address: 172.17.2xx.1/24 | ||
=Hinweis= | |||
;Am Client DHCP Adresse neubeziehen | |||
=Firewall= | =Firewall= | ||
==Firewall: Settings: Advanced== | ==Firewall: Settings: Advanced== | ||
Disable reply-to: (x) Disable reply-to on WAN rules | Disable reply-to: (x) Disable reply-to on WAN rules | ||
==Firewall: NAT: | ==Firewall: NAT: Source NAT== | ||
Mode: Manual Source NAT rule generation | |||
{| class="wikitable" | {| class="wikitable" | ||
! Interface !! Source !! | ! Interface !! Version !! Protocol !! Source !! Port !! Destination !! Port !! Translate Source IP !! Translate Source Port !! Description | ||
|- | |- | ||
| WAN || | | WAN || IPv4 || * || LAN network || * || * || * || Interface address || * || LAN ins Internet | ||
|- | |- | ||
| WAN || | | WAN || IPv4 || * || DMZ network || * || ! 10.88.0.0/16 || * || Interface address || * || DMZ ins Internet, kein NAT zu den anderen DMZs | ||
|- | |- | ||
| WAN || | | WAN || IPv4 || * || SERVER network || * || * || * || Interface address || * || SERVER ins Internet | ||
|} | |} | ||
==Firewall: Rules== | ==Firewall: Rules== | ||
Alle Regeln mit '''Action: Pass''' und '''Direction: in''', Interface '''WAN'''. | |||
{| class="wikitable" | {| class="wikitable" | ||
! Interface !! Protocol !! Source !! Port !! Destination !! Port !! Gateway | ! Interface !! Version !! Protocol !! Source !! Port !! Destination !! Port !! Gateway !! Description | ||
|- | |- | ||
| | | WAN || IPv4 || ICMP || * || * || * || * || * || Ping generell von Aussen | ||
|- | |- | ||
| | | LAN || IPv4 || * || LAN network || * || * || * || * || LAN to any | ||
|- | |- | ||
| | | DMZ || IPv4 || * || DMZ network || * || * || * || * || DMZ to any | ||
|- | |- | ||
| | | SERVER || IPv4 || * || SERVER network || * || * || * || * || SERVER to any | ||
|} | |} | ||
=System: Gateways: Configuration= | =System: Gateways: Configuration= | ||
{| class="wikitable" | {| class="wikitable" | ||
| Zeile 84: | Zeile 87: | ||
| Priority || 255 | | Priority || 255 | ||
|- | |- | ||
| IP Address || 192.168. | | IP Address || 192.168.HS.88 | ||
|- | |- | ||
| Upstream Gateway || ( ) | | Upstream Gateway || ( ) | ||
|} | |} | ||
=System: Routes: Configuration= | =System: Routes: Configuration= | ||
{| class="wikitable" | {| class="wikitable" | ||
| Zeile 100: | Zeile 104: | ||
| Description || UNSERE DMZs | | Description || UNSERE DMZs | ||
|} | |} | ||
=Systemnamen setzen= | |||
==System: Settings: General== | |||
*Hostname: opnsense | |||
*Domain: it213.xinmen.de | |||
=Zertifikat einpflegen= | =Zertifikat einpflegen= | ||
;Zertifikat holen | ;Zertifikat holen | ||
*wget https://web.samogo.de/certs/ | *wget https://web.samogo.de/certs/it2XX.xinmen.de.tgz | ||
;Entpacken | ;Entpacken | ||
*tar -xvzf it2*.xinmen.de.tgz | *tar -xvzf it2*.xinmen.de.tgz | ||
| Zeile 110: | Zeile 118: | ||
privkey.pem | privkey.pem | ||
;Hostname IP Test | ;Hostname IP Test | ||
*host opnsense. | *host opnsense.it2XX.xinmen.de | ||
opnsense. | opnsense.it2XX.xinmen.de has address 192.168.HS.2XX | ||
==Zertifikat aufteilen== | |||
Die fullchain.pem enthält 4 Zertifikate. OPNsense nimmt pro Eintrag nur eines. | |||
;Aufteilen | |||
*csplit -z -f cert- fullchain.pem '/-----BEGIN CERTIFICATE-----/' '{*}' | |||
<pre> | |||
cert-00 eigenes Zertifikat | |||
cert-01 Zwischenzertifikat | |||
cert-02 Zwischenzertifikat | |||
cert-03 Zwischenzertifikat | |||
</pre> | |||
==System: Trust: Authorities== | |||
Für cert-03, cert-02 und cert-01 (in dieser Reihenfolge) jeweils: | |||
*+ | |||
**Import an existing Certificate Authority | |||
**Description: le-chain-3 (bzw. le-chain-2, le-chain-1) | |||
;Certificate data | |||
Hier muss der Inhalt von cert-03 (bzw. cert-02, cert-01) rein. | |||
;Private key data | |||
Bleibt leer. | |||
;Dann sichern | |||
==System: Trust: Certificates== | |||
*+ | |||
**Import an existing Certificate | |||
**Description: star.it2XX.xinmen.de | |||
;Certificate data | |||
Hier muss der Inhalt von cert-00 rein. | |||
;Private key data | |||
Hier muss der Inhalt von privkey.pem rein. | |||
;Dann sichern | |||
Hintergrund: [[Let's Encrypt Zertifikatskette (Generation Y) in OPNsense]] | |||
==System: Trust: Certificates== | |||
*[[Let's Encrypt Zertifikatskette (Generation Y) in OPNsense]] | |||
==System: Settings: Administration== | |||
*SSL Certificate: star.it2XX.xinmen.de | |||
===Dann Zertifikat testen=== | |||
*https://opnsense.it2XX.xinmen.de:4444/ | |||
Aktuelle Version vom 2. November 2026, 17:05 Uhr
OPNsense Grundkonfiguration – vom Werkszustand zu eigenen Netzen
- Animation: OPNsense-Grundkonfiguration (einfach), mit abgesicherter Verwaltung, WAN-Interface, eigenen Netzen, NAT ohne Zugriff auf fremde DMZs, Firewall-Regeln mit Alias, Weg zu anderen DMZs über eine eigene Route, Name und Zertifikat, Fehlerbilder
System: Settings: Administration
(x) Enable HTTP Strict Transport Security TCP port 4444 (x) Disable web GUI redirect rule (x) Disable DNS Rebinding Checks (x) Enable Secure Shell (x) Permit root user login (x) Permit password login SSH PORT 2222
System: Gateway: Configuration
WANGW 192.168.HS.254 Interface: WAN (x) Upstream Gateway
Interfaces: WAN
( ) Block bogon networks ( ) Block private networks IPv4 Configuration Type: Static IPv4 192.168.HS.2XX/24 GW: WANGW
Interfaces: Assignments
em2: DMZ em3: SERVER
Interfaces: SERVER
Enable (x) IPv4 Configuration Type: Static IPv4 IPv4 address: 10.0.10.1/24
Interfaces: DMZ
Enable (x) IPv4 Configuration Type: Static IPv4 IPv4 address: 10.88.2xx.1/24
Services: Dnsmasq DNS & DHCP
DHCP Range: 172.17.2xx.100 bis 172.17.2xx.200
Interfaces: LAN
Enable (x) IPv4 Configuration Type: Static IPv4 IPv4 address: 172.17.2xx.1/24
Hinweis
- Am Client DHCP Adresse neubeziehen
Firewall
Firewall: Settings: Advanced
Disable reply-to: (x) Disable reply-to on WAN rules
Firewall: NAT: Source NAT
Mode: Manual Source NAT rule generation
| Interface | Version | Protocol | Source | Port | Destination | Port | Translate Source IP | Translate Source Port | Description |
|---|---|---|---|---|---|---|---|---|---|
| WAN | IPv4 | * | LAN network | * | * | * | Interface address | * | LAN ins Internet |
| WAN | IPv4 | * | DMZ network | * | ! 10.88.0.0/16 | * | Interface address | * | DMZ ins Internet, kein NAT zu den anderen DMZs |
| WAN | IPv4 | * | SERVER network | * | * | * | Interface address | * | SERVER ins Internet |
Firewall: Rules
Alle Regeln mit Action: Pass und Direction: in, Interface WAN.
| Interface | Version | Protocol | Source | Port | Destination | Port | Gateway | Description |
|---|---|---|---|---|---|---|---|---|
| WAN | IPv4 | ICMP | * | * | * | * | * | Ping generell von Aussen |
| LAN | IPv4 | * | LAN network | * | * | * | * | LAN to any |
| DMZ | IPv4 | * | DMZ network | * | * | * | * | DMZ to any |
| SERVER | IPv4 | * | SERVER network | * | * | * | * | SERVER to any |
System: Gateways: Configuration
| Parameter | Wert |
|---|---|
| Name | DNSGW |
| Interface | WAN |
| Address Family | IPv4 |
| Priority | 255 |
| IP Address | 192.168.HS.88 |
| Upstream Gateway | ( ) |
System: Routes: Configuration
| Parameter | Wert |
|---|---|
| Disabled | No |
| Network Address | 10.88.0.0/16 |
| Gateway | DNSGW - 192.168.4.88 |
| Description | UNSERE DMZs |
Systemnamen setzen
System: Settings: General
- Hostname: opnsense
- Domain: it213.xinmen.de
Zertifikat einpflegen
- Zertifikat holen
- Entpacken
- tar -xvzf it2*.xinmen.de.tgz
- Zertifikat
fullchain.pem
- Private Schlüssel
privkey.pem
- Hostname IP Test
- host opnsense.it2XX.xinmen.de
opnsense.it2XX.xinmen.de has address 192.168.HS.2XX
Zertifikat aufteilen
Die fullchain.pem enthält 4 Zertifikate. OPNsense nimmt pro Eintrag nur eines.
- Aufteilen
- csplit -z -f cert- fullchain.pem '/-----BEGIN CERTIFICATE-----/' '{*}'
cert-00 eigenes Zertifikat cert-01 Zwischenzertifikat cert-02 Zwischenzertifikat cert-03 Zwischenzertifikat
System: Trust: Authorities
Für cert-03, cert-02 und cert-01 (in dieser Reihenfolge) jeweils:
- +
- Import an existing Certificate Authority
- Description: le-chain-3 (bzw. le-chain-2, le-chain-1)
- Certificate data
Hier muss der Inhalt von cert-03 (bzw. cert-02, cert-01) rein.
- Private key data
Bleibt leer.
- Dann sichern
System: Trust: Certificates
- +
- Import an existing Certificate
- Description: star.it2XX.xinmen.de
- Certificate data
Hier muss der Inhalt von cert-00 rein.
- Private key data
Hier muss der Inhalt von privkey.pem rein.
- Dann sichern
Hintergrund: Let's Encrypt Zertifikatskette (Generation Y) in OPNsense
System: Trust: Certificates
System: Settings: Administration
- SSL Certificate: star.it2XX.xinmen.de