Skip to content

Commit 91bbcb8

Browse files
aequitasmxsasha
authored andcommitted
Use the configured public IPv(4|6) for outgoing traffic as well
1 parent 9242a09 commit 91bbcb8

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docker/compose.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,6 +1111,9 @@ networks:
11111111
com.docker.network.enable_ipv6: "true"
11121112
# network for internal communication between services
11131113
com.docker.network.bridge.enable_icc: "true"
1114+
# set NAT source IPs to the configured public IPs
1115+
com.docker.network.host_ipv4: $IPV4_IP_PUBLIC
1116+
com.docker.network.host_ipv6: $IPV6_IP_PUBLIC
11141117
ipam:
11151118
driver: default
11161119
config:

documentation/Docker-deployment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,17 +124,17 @@ To create the `docker/host.env` configuration file, the following inputs are req
124124

125125
Public IPv4 address (eg: `192.0.2.1`)
126126

127-
This is the address by which the website and Unbound DNS is accessible over IPv4 on public internet.
127+
This is the address by which the website and Unbound DNS is accessible over IPv4 on public internet. And also the address used as source IP for all outgoing traffic.
128128

129129
To determine the current IPv4 address you can use: `ip -4 addr show dev eth0` or `curl -4 ifconfig.io`.
130130

131131
- `IPV6_IP_PUBLIC`:
132132

133133
Public IPv4 address (eg: `2001:db8:1::1`)
134134

135-
This is the address by which the website and Unbound DNS is accessible over IPv6 on public internet.
135+
This is the address by which the website and Unbound DNS is accessible over IPv6 on public internet. And also the address used as source IP for all outgoing traffic.
136136

137-
To determine the current IPv4 address you can use: `ip -6 addr show dev eth0` or `curl -6 ifconfig.io`.
137+
To determine the current IPv6 address you can use: `ip -6 addr show dev eth0` or `curl -6 ifconfig.io`.
138138

139139
All IPv6 addresses must be in condensed form, i.e. `2001:db8:1::1` and not `2001:db8:0000:0000:0000:0000:0000:1`.
140140

0 commit comments

Comments
 (0)