mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
Docker DEV (#737)
This commit is contained in:
8
scripts/dev_start.sh
Executable file
8
scripts/dev_start.sh
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
ip link add dev wg-firezone type wireguard
|
||||
ip address add dev wg-firezone 10.3.2.1/24
|
||||
ip -6 address add dev wg-firezone fd00::3:2:1/120
|
||||
ip link set up dev wg-firezone
|
||||
|
||||
mix start
|
||||
9
scripts/post-down-wg.sh
Executable file
9
scripts/post-down-wg.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
FIREZONE_DEV_V4='172.28.0.0/16'
|
||||
FIREZONE_DEV_V6='2001:3990:3990::/64'
|
||||
TABLE=333444
|
||||
|
||||
sudo ip -4 rule del from $FIREZONE_DEV_V4 table $TABLE
|
||||
sudo ip -4 route flush table $TABLE
|
||||
sudo ip -6 rule del from $FIREZONE_DEV_V6 table $TABLE
|
||||
sudo ip -6 route flush table $TABLE
|
||||
19
scripts/post-up-wg.sh
Executable file
19
scripts/post-up-wg.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
FIREZONE_DEV_V4='172.28.0.0/16'
|
||||
FIREZONE_DEV_V6='2001:3990:3990::/64'
|
||||
TABLE=333444
|
||||
DEFAULT_ROUTE_V4=$(sudo ip -4 route | grep ^default)
|
||||
DOCKER_ROUTE_V4=$(sudo ip -4 route | grep ^$FIREZONE_DEV_V4)
|
||||
DEFAULT_ROUTE_V6=$(sudo ip -6 route | grep ^default)
|
||||
DOCKER_ROUTE_V6=$(sudo ip -6 route | grep ^$FIREZONE_DEV_V6)
|
||||
|
||||
sudo ip -4 route add $DEFAULT_ROUTE_V4 table $TABLE
|
||||
sudo ip -4 route add $DOCKER_ROUTE_V4 table $TABLE
|
||||
sudo ip -6 route add $DOCKER_ROUTE_V6 table $TABLE
|
||||
if [ ! -z "$DEFAULT_ROUTE_V6"]
|
||||
then
|
||||
sudo ip -6 route add $DEFAULT_ROUTE_V6 table $TABLE
|
||||
fi
|
||||
|
||||
sudo ip -4 rule add from $FIREZONE_DEV_V4 table $TABLE
|
||||
sudo ip -6 rule add from $FIREZONE_DEV_V6 table $TABLE
|
||||
Reference in New Issue
Block a user