Compare commits
11 Commits
dev
...
6f26b9bbc3
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f26b9bbc3 | |||
| a34a70572f | |||
| 4b3c8a2424 | |||
| 568b3bf495 | |||
| 5653d32857 | |||
| 7cf5b8df48 | |||
| 65c5fc0f8f | |||
| b626a67907 | |||
| 6643a176a6 | |||
| 89803754a7 | |||
| 5052b3e83a |
15
dnsmasq.conf
Normal file
15
dnsmasq.conf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# DNS-Server für ca-lose VPN-Clients
|
||||||
|
# Upstream DNS für externe Anfragen
|
||||||
|
server=1.1.1.1
|
||||||
|
server=8.8.8.8
|
||||||
|
|
||||||
|
# Kein DHCP, nur DNS
|
||||||
|
no-dhcp-interface=
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
log-queries
|
||||||
|
|
||||||
|
# Interne Hostnamen
|
||||||
|
address=/lose-verkaufen/172.25.0.10
|
||||||
|
address=/ca-lose-frontend/172.25.0.10
|
||||||
|
address=/ca-lose-backend/172.25.0.11
|
||||||
@@ -4,7 +4,8 @@ services:
|
|||||||
hostname: lose-verkaufen
|
hostname: lose-verkaufen
|
||||||
build: ./frontend
|
build: ./frontend
|
||||||
networks:
|
networks:
|
||||||
- ca-lose-internal
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.10
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
@@ -19,7 +20,8 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- database
|
- database
|
||||||
networks:
|
networks:
|
||||||
- ca-lose-internal
|
ca-lose-internal:
|
||||||
|
ipv4_address: 172.25.0.11
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
|
||||||
database:
|
database:
|
||||||
@@ -36,31 +38,47 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- ca-lose-internal
|
- ca-lose-internal
|
||||||
|
|
||||||
wireguard:
|
dns:
|
||||||
container_name: ca-lose-wireguard
|
container_name: ca-lose-dns
|
||||||
image: ghcr.io/wg-easy/wg-easy
|
image: jpillora/dnsmasq
|
||||||
environment:
|
restart: unless-stopped
|
||||||
- WG_HOST=${WG_HOST}
|
|
||||||
- WG_DEFAULT_ADDRESS=10.10.0.x
|
|
||||||
- WG_DEFAULT_DNS=1.1.1.1
|
|
||||||
- WG_ALLOWED_IPS=172.25.0.0/24
|
|
||||||
- WG_PORT=51830
|
|
||||||
- PASSWORD_HASH=${WG_PASSWORD_HASH}
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./wireguard-data:/etc/wireguard
|
- ./dnsmasq.conf:/etc/dnsmasq.conf:ro
|
||||||
ports:
|
networks:
|
||||||
- "51830:51820/udp" # WireGuard extern erreichbar auf Port 51830
|
ca-lose-internal:
|
||||||
- "127.0.0.1:51821:51821/tcp" # Web-UI nur lokal erreichbar
|
ipv4_address: 172.25.0.5
|
||||||
|
|
||||||
|
wireguard:
|
||||||
|
image: lscr.io/linuxserver/wireguard:latest
|
||||||
|
container_name: ca-lose-wireguard
|
||||||
cap_add:
|
cap_add:
|
||||||
- NET_ADMIN
|
- NET_ADMIN
|
||||||
- SYS_MODULE
|
- SYS_MODULE
|
||||||
|
environment:
|
||||||
|
- PUID=1000
|
||||||
|
- PGID=1000
|
||||||
|
- TZ=Europe/Berlin
|
||||||
|
- SERVERURL=dus3.the1s.de
|
||||||
|
- SERVERPORT=51830
|
||||||
|
- PEERS=2
|
||||||
|
- PEERDNS=172.25.0.5
|
||||||
|
- INTERNAL_SUBNET=10.13.13.0
|
||||||
|
- ALLOWEDIPS=172.25.0.0/24
|
||||||
|
- PERSISTENTKEEPALIVE_PEERS=25
|
||||||
|
- LOG_CONFS=true
|
||||||
|
- POST_UP=iptables -t nat -A POSTROUTING -s 10.13.13.0/24 -o eth0 -j MASQUERADE
|
||||||
|
- POST_DOWN=iptables -t nat -D POSTROUTING -s 10.13.13.0/24 -o eth0 -j MASQUERADE
|
||||||
|
volumes:
|
||||||
|
- ./wireguard-config:/config
|
||||||
|
- /lib/modules:/lib/modules
|
||||||
|
ports:
|
||||||
|
- 51830:51830/udp
|
||||||
sysctls:
|
sysctls:
|
||||||
- net.ipv4.ip_forward=1
|
|
||||||
- net.ipv4.conf.all.src_valid_mark=1
|
- net.ipv4.conf.all.src_valid_mark=1
|
||||||
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- ca-lose-internal
|
- ca-lose-internal
|
||||||
- proxynet
|
- proxynet
|
||||||
restart: unless-stopped
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
ca-lose_mysql:
|
ca-lose_mysql:
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export const MainForm = () => {
|
|||||||
: null,
|
: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
const response = await fetch("http://localhost:8004/default/frontend", {
|
const response = await fetch("/backend/default/frontend", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
body: JSON.stringify(payload),
|
body: JSON.stringify(payload),
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ export const MainForm = () => {
|
|||||||
// Fetch user data or any other data needed for the form
|
// Fetch user data or any other data needed for the form
|
||||||
try {
|
try {
|
||||||
const fetchUsers = async () => {
|
const fetchUsers = async () => {
|
||||||
const response = await fetch("http://localhost:8004/default/users");
|
const response = await fetch("/backend/default/users");
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setUsers(data.users);
|
setUsers(data.users);
|
||||||
};
|
};
|
||||||
@@ -78,7 +78,7 @@ export const MainForm = () => {
|
|||||||
const confirmUser = async (selectedUser: string) => {
|
const confirmUser = async (selectedUser: string) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
`http://localhost:8004/default/confirm-user?username=${selectedUser}`
|
`/backend/default/confirm-user?username=${selectedUser}`
|
||||||
);
|
);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setNextID(data.nextID);
|
setNextID(data.nextID);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ interface FormData {
|
|||||||
|
|
||||||
export const submitFormData = async (data: FormData, username: string) => {
|
export const submitFormData = async (data: FormData, username: string) => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`http://localhost:8004/default/new-entry?username=${username}`, {
|
const response = await fetch(`/backend/default/new-entry?username=${username}`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user