blob: 54a0ac20e116c42c9b901e94e157142915e59693 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
# Virgil Rebuild
## Standing up a new container
```sh
root@tk2022:~# incus profile edit admin-lan
config: {}
description: ""
devices:
eth1:
name: eth1
nictype: bridged
parent: br1
type: nic
name: admin-lan
project: default
```
```sh
root@tk2022:~# incus init trixie -p default -p susdev25 -p admin-lan virgil -c cloud-init.network-config="$(cat <<EOF
version: 2
ethernets:
eth0:
addresses:
- 69.41.138.125/27
gateway4: 69.41.138.97
nameservers:
addresses:
- 69.41.138.98
- 8.8.4.4
eth1:
addresses:
- 192.168.31.228/24
EOF
)
"
```
### Fix resolv.conf
Now that we are debian based and are using the incus cloud images we should update our profile to set up resolv.conf correctly. In the mean time lets fix the foobarred install left by their cloud init.
```
root@virgil:~# resolvconf -l
# resolv.conf from original.resolvconf
nameserver 69.41.138.98
nameserver 8.8.4.4
search suspectdevices.com fromhell.com vpn
# resolv.conf from systemd-resolved
nameserver 127.0.0.53
search suspectdevices.com fromhell.com vpn
root@virgil:~# systemctl stop systemd-resolved
root@virgil:~# systemctl disable systemd-resolved
root@virgil:~# rm /etc/resolv.conf
root@virgil:~# cat > /etc/resolv.conf <<EOD
> # resolv.conf from original.resolvconf
nameserver 69.41.138.98
nameserver 8.8.4.4
search suspectdevices.com fromhell.com vpn
> EOD
```
## Install tinyproxy
```sh
apt install tinyproxy -y
cat > /etc/tinyproxy/tinyproxy.conf <<EOD
User tinyproxy
Group tinyproxy
Port 3128
Listen 192.168.31.228
Timeout 600
DefaultErrorFile "/usr/share/tinyproxy/default.html"
StatFile "/usr/share/tinyproxy/stats.html"
LogLevel Info
PidFile "/run/tinyproxy/tinyproxy.pid"
MaxClients 10
Allow 192.168.31.1/24
ViaProxyName "tinyproxy"
EOD
systemctl enable --now tinyproxy
```
### Test tinyproxy
```sh
root@tk2022:~# curl -x 192.168.31.228:3128 http://archive.ubuntu.com/ubuntu/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<title>Index of /ubuntu</title>
```
## Wireguard
## References:
- [https://oneuptime.com/blog/post/2026-03-02-how-to-disable-systemd-resolved-and-use-etc-resolv-conf-directly-on-ubuntu/view](https://oneuptime.com/blog/post/2026-03-02-how-to-disable-systemd-resolved-and-use-etc-resolv-conf-directly-on-ubuntu/view)
- [https://www.digithink.com/rethinkeverything/norouter/wireguard-and-tinyproxy/](https://www.digithink.com/rethinkeverything/norouter/wireguard-and-tinyproxy/)
|