Update Network

2025-12-22 16:58:09 +00:00
parent c030e6dead
commit 6bf8ed40e8

@@ -1,3 +1,5 @@
# Netplan
This is high-priority, because changing Netplan will switch down ssh session. This is high-priority, because changing Netplan will switch down ssh session.
Change /etc/netplan/**.yaml : Change /etc/netplan/**.yaml :
@@ -16,3 +18,28 @@ Note that MAC of the device will change, so IP can also change and ssh session w
Note that changing net or device config of host may change the name of enp3s0 interface, and reconfiguration will be needed. Note that changing net or device config of host may change the name of enp3s0 interface, and reconfiguration will be needed.
AFTER HELL AMOUNT OF TIME I figured out that router setting remote IP is not MY ip, but the machine that sends requests remote ip, so just need to keep empty! fuck. also, access from intranet by ip does not actually goes outside the intranet. fuck. AFTER HELL AMOUNT OF TIME I figured out that router setting remote IP is not MY ip, but the machine that sends requests remote ip, so just need to keep empty! fuck. also, access from intranet by ip does not actually goes outside the intranet. fuck.
# Caddy
https://caddyserver.com/docs/install#debian-ubuntu-raspbian
https://caddyserver.com/docs/getting-started
https://caddyserver.com/docs/running caddy service is running
temprorarily downloaded dns records, check if second-level domain is an issue.
FUCKING SHIT
1. caddy needs both 80 and 443 ports, otherwise permanent redirect issue
2. TSL and lets encrypt errors can be debugged by runnung ` curl -v http://alogins.net/.well-known/acme-challenge/test`. Needs to have HTTP 200 for success.
3. port forwarding MUST HAVE BOTH SRC AND TARGET PORTS! otherwise it forwards to the incorrect internal port
Reloading config:
```
curl localhost:2019/load -H "Content-Type: application/json" -d @caddy.json
```
Need to adjust after adding new domains.
See Nextcloud section for setting up trusted proxies (otherwise there is bug with too many requests).