This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| raspberry_wireguard [2022/02/17 18:53] – herwarth | raspberry_wireguard [2022/02/17 19:07] (current) – herwarth | ||
|---|---|---|---|
| Line 53: | Line 53: | ||
| <code - / | <code - / | ||
| alias temp='/ | alias temp='/ | ||
| + | </ | ||
| + | ====Unattended upgrades==== | ||
| + | I do not want to update manually. | ||
| + | < | ||
| + | apt install -y unattended-upgrades apt-listchanges | ||
| + | </ | ||
| + | < | ||
| + | cp / | ||
| + | </ | ||
| + | <code - / | ||
| + | . | ||
| + | . | ||
| + | Unattended-Upgrade:: | ||
| + | // Codename based matching: | ||
| + | // This will follow the migration of a release through different | ||
| + | // archives (e.g. from testing to stable and later oldstable). | ||
| + | // Software will be the latest available for the named release, | ||
| + | // but the Debian release itself will not be automatically upgraded. | ||
| + | " | ||
| + | |||
| + | // Archive or Suite based matching: | ||
| + | // Note that this will silently match a different release after | ||
| + | // migration to the specified archive (e.g. testing becomes the | ||
| + | // new stable). | ||
| + | // " | ||
| + | // " | ||
| + | // " | ||
| + | // " | ||
| + | }; | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | // Remove unused automatically installed kernel-related packages | ||
| + | // (kernel images, kernel headers and kernel version locked tools). | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | // Do automatic removal of newly unused dependencies after the upgrade | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | // Do automatic removal of unused packages after the upgrade | ||
| + | // (equivalent to apt-get autoremove) | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | // Automatically reboot *WITHOUT CONFIRMATION* if | ||
| + | // the file / | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | // Automatically reboot even if there are users currently logged in | ||
| + | // when Unattended-Upgrade:: | ||
| + | Unattended-Upgrade:: | ||
| + | |||
| + | // If automatic reboot is enabled and needed, reboot at the specific | ||
| + | // time instead of immediately | ||
| + | // Default: " | ||
| + | Unattended-Upgrade:: | ||
| + | . | ||
| + | . | ||
| + | </ | ||
| + | Test | ||
| + | < | ||
| + | unattended-upgrades -d | ||
| + | </ | ||
| + | This should not give any error | ||
| + | < | ||
| + | dpkg-reconfigure -plow unattended-upgrades | ||
| </ | </ | ||
| ===== Wireguard ===== | ===== Wireguard ===== | ||
| ==== Packages ==== | ==== Packages ==== | ||
| < | < | ||
| - | apt install -y wireguard | + | apt install -y wireguard |
| </ | </ | ||
| ==== IP forwarding==== | ==== IP forwarding==== | ||
| Line 115: | Line 180: | ||
| </ | </ | ||
| - | </code> | + | ==== Enable masquerading ==== |
| + | Raspberry OS has changed to nftables instead of iptabes | ||
| + | < | ||
| + | . | ||
| + | . | ||
| + | . | ||
| + | add table wireguard-nat | ||
| + | table ip wireguard-nat { | ||
| + | chain prerouting { | ||
| + | type nat hook prerouting priority -100; policy accept; | ||
| + | } | ||
| + | |||
| + | chain postrouting { | ||
| + | type nat hook postrouting priority 100; policy accept; | ||
| + | oifname " | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | < | ||
| + | systemctl enable --now nftables | ||
| + | systemctl start nftables | ||
| + | </ | ||
| + | ====Done==== | ||
| + | Do a final reboot | ||
| + | < | ||
| + | shutdown -r now | ||
| + | </ | ||
| {{tag> | {{tag> | ||