enable ipv6

This commit is contained in:
Matthew Tran 2023-09-22 09:09:25 +00:00
parent 0f682ba164
commit fe653923f5
3 changed files with 30 additions and 2 deletions

View File

@ -24,6 +24,17 @@ Forward the following ports to the server.
| terraria | 7777 |
| wireguard | 51820 |
Make sure IPv6 is enabled in Docker by modifying `/etc/docker/daemon.json`. For example:
```
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:1::/64",
"experimental": true,
"ip6tables": true
}
```
Run the following commands. For the IP update script, add a SendGrid API key to `website/sendgrid.key`.
```

View File

@ -1,3 +1,9 @@
networks:
default6:
enable_ipv6: true
ipam:
config:
- subnet: fd3a:138e:8fd0:0001::/64
services:
website:
restart: always
@ -6,6 +12,8 @@ services:
ports:
- "80:80"
- "443:443"
networks:
- default6
volumes:
- ./website/letsencrypt:/etc/letsencrypt
gitea:
@ -13,6 +21,8 @@ services:
image: gitea/gitea:latest-rootless
ports:
- "2222:2222"
networks:
- default6
volumes:
- ./website/gitea/data:/var/lib/gitea
- ./website/gitea/config:/etc/gitea
@ -26,6 +36,8 @@ services:
tty: true
ports:
- "18080:18080"
networks:
- default6
volumes:
- ./monerod/.bitmonero:/home/matt/.bitmonero
p2pool:
@ -38,6 +50,8 @@ services:
- "3333:3333"
- "37888:37888"
- "37889:37889"
networks:
- default6
volumes:
- ./p2pool/cache:/home/matt/cache
- /dev/hugepages:/dev/hugepages
@ -47,6 +61,8 @@ services:
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
ports:
- "25565:25565"
networks:
- default6
volumes:
- ./minecraft/world:/home/matt/world
terraria:
@ -55,5 +71,7 @@ services:
entrypoint: ["/bin/sh", "/home/matt/entry.sh"]
ports:
- "7777:7777"
networks:
- default6
volumes:
- ./terraria/worlds:/home/matt/worlds

View File

@ -12,8 +12,7 @@ if __name__ == '__main__':
old_ipv4, old_ipv6 = None, None
while True:
ipv4 = urllib.request.urlopen('https://v4.ident.me').read().decode('utf8')
ipv6 = None
# ipv6 = urllib.request.urlopen('https://v6.ident.me').read().decode('utf8')
ipv6 = urllib.request.urlopen('https://v6.ident.me').read().decode('utf8')
if ipv4 != old_ipv4 or ipv6 != old_ipv6:
msg = Mail(