Home
Help
Search
Login
Register
OPNsense Forum
»
International Forums
»
French - Français
(Moderator:
slemoal@tiscom.fr
) »
configuration proxy caddy
« previous
next »
Print
Pages: [
1
]
2
Author
Topic: configuration proxy caddy (Read 2245 times)
lmornet
Newbie
Posts: 10
Karma: 0
configuration proxy caddy
«
on:
July 11, 2024, 08:32:50 pm »
Bonsoir,
débutant sur opnsense soyez indulgant
j'ai configurer une redirection de port wan >> lan
j'ai un nom de domaine ha.isell.fr je le ping de mon ordi
j'ai configuré caddy en suivante la documentaion
la verification réglage géneraux est validée
mais quand je me connecte sur ha.isell.fr j'obtiens une page blanche par contre elle est sécurisée rt je peux voir le certificat
dans le fichier journal de caddy j'ai cette erreur
"error","ts":"2024-07-11T18:14:30Z","logger":"http.log.access.419d795a-0fb6-41bd-bf0e-160b3500ad0b","msg":"handled request","request":{"remote_ip":"192.168.1.90","remote_port":"58726","client_ip":"192.168.1.90","proto":"HTTP/2.0","method":"GET","host":"ha.isell.fr","uri":"/config/dashboard","headers":{"Sec-Fetch-User":["?1"],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"],"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-Dest":["document"],"Sec-Fetch-Mode":["navigate"],"Priority":["u=1"],"Te":["trailers"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"],"Accept-Language":["fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Site":["none"]},"tls":{"resumed":false,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"ha.isell.fr"}},"bytes_read":0,"user_id":"","duration":0.005032615,"size":0,"status":502,"resp_headers":{"Server":["Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000"]}}
je ne comprends pas si vous pouvez m'aider
Merci
Logged
Monviech
Hero Member
Posts: 1328
Karma: 152
Re: configuration proxy caddy
«
Reply #1 on:
July 11, 2024, 09:08:17 pm »
Je voudrais le Caddyfile.
Upstream Destination HTTPS ou HTTP?
Logged
Hardware:
DEC740
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #2 on:
July 12, 2024, 11:35:33 am »
Bnjour,
voici le caddyfile:
# DO NOT EDIT THIS FILE -- OPNsense auto-generated file
# Global Options
{
log {
include http.log.access.419d795a-0fb6-41bd-bf0e-160b3500ad0b
output net unixgram//var/caddy/var/run/log {
}
format json {
time_format rfc3339
}
level DEBUG
}
email lucien.mornet@isell.fr
grace_period 10s
import /usr/local/etc/caddy/caddy.d/*.global
}
# Reverse Proxy Configuration
# Reverse Proxy Domain: "419d795a-0fb6-41bd-bf0e-160b3500ad0b"
*.isell.fr {
log 419d795a-0fb6-41bd-bf0e-160b3500ad0b
tls {
dns infomaniak QmkOZo6dRShX1W7pH8-OHmSjXbqt5ydpJ5J8fU28iRRhtBLE0kaBn0YadtP-T1XvIukVm8_pMYNn9GiB
}
@48ed335f-ddb2-4d8c-9ca8-0769d64df27b {
host ha.isell.fr
}
handle @48ed335f-ddb2-4d8c-9ca8-0769d64df27b {
handle {
reverse_proxy 192.168.1.6 {
}
}
}
}
import /usr/local/etc/caddy/caddy.d/*.conf
je redirige sur
http://192.168.1.6:8123
merci
Logged
Monviech
Hero Member
Posts: 1328
Karma: 152
Re: configuration proxy caddy
«
Reply #3 on:
July 12, 2024, 11:48:56 am »
Revoke Infomaniak API key.
Handle:
- Upstream Destination: 192.168.1.6
- Upstream Port: 8123
Pour TLS (HTTPS) de Upstream Destination:
- TLS Insecure Skip Verify
«
Last Edit: July 12, 2024, 11:53:02 am by Monviech
»
Logged
Hardware:
DEC740
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #4 on:
July 12, 2024, 01:21:07 pm »
pourquoi Révoquer la clé API Infomaniak. ?
il me faut un certicat pour ha.isell.fr
je me connecte en https sur ha.isell.fr
et je fait une redirection de port sur 192.168.1.6:8123
je me suis peu-être mal exprimer sur sur ma demande
Logged
Monviech
Hero Member
Posts: 1328
Karma: 152
Re: configuration proxy caddy
«
Reply #5 on:
July 12, 2024, 01:34:45 pm »
Sorry my french is not so good.
- Revoke the API Key, you might have posted the real one here, in the Caddyfile.
- You don't need Port Forwarding, disable the port forwarding rule.
- You only need Firewall Rule to Caddy, 80/443.
https://docs.opnsense.org/manual/how-tos/caddy.html
«
Last Edit: July 12, 2024, 01:37:22 pm by Monviech
»
Logged
Hardware:
DEC740
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #6 on:
July 12, 2024, 04:18:40 pm »
j'ai déactiver la redirection de pourt mais le problème demeure
j'obtiens le certificat pour ha.isell.fr mais j'ai toujours l'erreur dans les log de caddy :
"error","ts":"2024-07-12T14:16:21Z","logger":"http.log.access.419d795a-0fb6-41bd-bf0e-160b3500ad0b","msg":"handled request","request":{"remote_ip":"192.168.1.90","remote_port":"43398","client_ip":"192.168.1.90","proto":"HTTP/2.0","method":"GET","host":"ha.isell.fr","uri":"/","headers":{"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Sec-Fetch-Dest":["document"],"Sec-Fetch-Site":["none"],"Priority":["u=1"],"Te":["trailers"],"User-Agent":["Mozilla/5.0 (X11; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0"],"Accept-Language":["fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3"],"Upgrade-Insecure-Requests":["1"],"Sec-Fetch-Mode":["navigate"],"Sec-Fetch-User":["?1"]},"tls":{"resumed":true,"version":772,"cipher_suite":4867,"proto":"h2","server_name":"ha.isell.fr"}},"bytes_read":0,"user_id":"","duration":0.000486207,"size":0,"status":502,"resp_headers":{"Server":["Caddy"],"Alt-Svc":["h3=\":443\"; ma=2592000"]}}
quand je me connecte sur
https://ha.isell.fr
, j'obtiens une page blanche
Logged
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #7 on:
July 12, 2024, 04:30:34 pm »
régles LAN
«
Last Edit: July 12, 2024, 04:39:49 pm by lmornet
»
Logged
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #8 on:
July 12, 2024, 04:32:20 pm »
règles wan
Logged
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #9 on:
July 12, 2024, 04:38:01 pm »
ma page blanche https///ha.isell.fr
on constate que la page est bien sécurisé avec le certificat
Logged
Monviech
Hero Member
Posts: 1328
Karma: 152
Re: configuration proxy caddy
«
Reply #10 on:
July 12, 2024, 05:08:00 pm »
No port 8123 in config?
handle @48ed335f-ddb2-4d8c-9ca8-0769d64df27b {
handle {
reverse_proxy 192.168.1.6 { <---- no port here, empty port means port 80 is used.
}
Logged
Hardware:
DEC740
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #11 on:
July 12, 2024, 05:37:43 pm »
comment je fait pour mettre le port 8123
merci
Logged
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #12 on:
July 12, 2024, 06:26:46 pm »
c'est un domaine générique *.isell.fr (wildcard ) et tous mes sous domaine son rediriger ver le port parent *.isell.fr
donc mon sous domaine ha.isell.fr a le port du domaine générique *.isell.fr (80, 443)
c'est bien ca ?
donc comment faire pour un port différent ?
avec NAT ?
merci
Logged
Monviech
Hero Member
Posts: 1328
Karma: 152
Re: configuration proxy caddy
«
Reply #13 on:
July 12, 2024, 06:32:23 pm »
https://docs.opnsense.org/manual/how-tos/caddy.html#creating-a-simple-reverse-proxy
Handler
Domain: *.isell.fr
Subdomain: ha.isell.fr
Upstream Domain: 192.168.1.6
Upstream Port: 8123
«
Last Edit: July 12, 2024, 06:48:14 pm by Monviech
»
Logged
Hardware:
DEC740
lmornet
Newbie
Posts: 10
Karma: 0
Re: configuration proxy caddy
«
Reply #14 on:
July 12, 2024, 08:58:20 pm »
super ca marche
merci beaucoup
bonne soirée
Logged
Print
Pages: [
1
]
2
« previous
next »
OPNsense Forum
»
International Forums
»
French - Français
(Moderator:
slemoal@tiscom.fr
) »
configuration proxy caddy