Skip to content

Commit 551e4a3

Browse files
author
Patrick M
committed
update: debian lxc
1 parent 211276e commit 551e4a3

File tree

1 file changed

+13
-22
lines changed

1 file changed

+13
-22
lines changed

src/data/blog/2022/debian-lxc-setup.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ chsh -s /bin/bash patrick
2727
passwd patrick
2828
```
2929

30+
## Enable Fail2ban
31+
32+
``` bash
33+
sudo systemctl enable --now fail2ban && sudo systemctl status fail2ban
34+
sudo fail2ban-client status
35+
```
36+
3037
## Make the CLI more fun
3138

3239
Add the following lines to [add color to bash](https://wiki.debian.org/BashColors):
@@ -79,30 +86,14 @@ patrick ALL=(ALL) NOPASSWD: ALL
7986
8087
## Unattended Upgrades Configuration
8188

82-
Edit the following file.
89+
Update every package by default
8390

8491
```bash
85-
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
92+
sudo sed -i '/Unattended-Upgrade::Origins-Pattern {/a\ "origin=*";' /etc/apt/apt.conf.d/50unattended-upgrades
8693
```
8794

88-
Uncomment the following line
89-
90-
```diff
91-
Unattended-Upgrade::Origins-Pattern {
92-
+ "origin=*";
93-
- "origin=Debian,codename=${distro_codename}-updates";
94-
-// "origin=Debian,codename=${distro_codename}-proposed-updates";
95-
- "origin=Debian,codename=${distro_codename},label=Debian";
96-
- "origin=Debian,codename=${distro_codename},label=Debian-Security";
97-
- "origin=Debian,codename=${distro_codename}-security,label=Debian-Security";
98-
99-
- // Archive or Suite based matching:
100-
- // Note that this will silently match a different release after
101-
- // migration to the specified archive (e.g. testing becomes the
102-
- // new stable).
103-
-// "o=Debian,a=stable";
104-
-// "o=Debian,a=stable-updates";
105-
-// "o=Debian,a=proposed-updates";
106-
-// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports";
107-
};
95+
Verify the change
96+
97+
```bash
98+
sudo head -n 50 /etc/apt/apt.conf.d/50unattended-upgrades
10899
```

0 commit comments

Comments
 (0)