caddy: deny access to private services outside LAN/VPN
This commit is contained in:
parent
58a2a1526b
commit
1b3e800443
@ -19,6 +19,11 @@ dataroot: /var/lib/serv_data
|
|||||||
dyndns_domain: null
|
dyndns_domain: null
|
||||||
# dyndns_domain: d.nerdpol.ovh
|
# dyndns_domain: d.nerdpol.ovh
|
||||||
|
|
||||||
|
# limit this to, for example, your VPN subnet or your local subnet
|
||||||
|
# alternatively, 0.0.0.0/0 to open up the internal services to all
|
||||||
|
# for multiple subnets, separate with spaces
|
||||||
|
internal_cidr: "{{ local_subnet }}"
|
||||||
|
|
||||||
# this is set true in group_vars/bastion/vars.yml
|
# this is set true in group_vars/bastion/vars.yml
|
||||||
enable_ddclient: false
|
enable_ddclient: false
|
||||||
|
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
(external) {
|
||||||
|
@external not remote_ip {{ internal_cidr }}
|
||||||
|
}
|
||||||
|
|
||||||
import conf.d/*
|
import conf.d/*
|
||||||
|
|
||||||
{% if "website" in group_names %}
|
{% if "website" in group_names %}
|
||||||
@ -27,6 +31,9 @@ www.{{ domain }} {
|
|||||||
|
|
||||||
{% if groups["navidrome"] | length > 0 %}
|
{% if groups["navidrome"] | length > 0 %}
|
||||||
{{ navidrome_domain }} {
|
{{ navidrome_domain }} {
|
||||||
|
import external
|
||||||
|
respond @external 403
|
||||||
|
|
||||||
reverse_proxy {{ groups["navidrome"][0] }}:4533
|
reverse_proxy {{ groups["navidrome"][0] }}:4533
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -43,6 +50,9 @@ www.{{ domain }} {
|
|||||||
|
|
||||||
{% if groups["paperless"] | length > 0 %}
|
{% if groups["paperless"] | length > 0 %}
|
||||||
{{ paperless_domain }} {
|
{{ paperless_domain }} {
|
||||||
|
import external
|
||||||
|
respond @external 403
|
||||||
|
|
||||||
reverse_proxy {{ groups["paperless"][0] }}:8000
|
reverse_proxy {{ groups["paperless"][0] }}:8000
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user