Skip to content

Commit

Permalink
fix: docker was making a conflicting rule against otel/iptables, this…
Browse files Browse the repository at this point in the history
… resolves the prerouting
  • Loading branch information
johnrwatson committed Jan 11, 2024
1 parent f5b77d0 commit a11254a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ execute_configuration_management() {
# This permits NAT from within the Jail to access the otelcol running on the external interface of the machine. Localhost is `not` resolveable from
# within the jail or the micro-vm directly due to /etc/hosts misalignment. Hardcoding the destination to 12.0.0.1 for the otel endpoint allows us to
# ship a static copy of the rootfs but allow us to keep the dynamic nature of the machine hosting.
if ! iptables -t nat -C PREROUTING -p tcp --dport 4317 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317; then
iptables -t nat -A PREROUTING -p tcp --dport 4317 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317
if ! iptables -t nat -C PREROUTING -p tcp --dport 4316 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317; then
iptables -t nat -A PREROUTING -p tcp --dport 4316 -d 1.0.0.1 -j DNAT --to-destination $(ip route get 8.8.8.8 | awk -- '{printf $7}'):4317
fi

else
Expand Down
2 changes: 1 addition & 1 deletion prelude-si/rootfs/rootfs_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ supervisor="supervise-daemon"
pidfile="/cyclone/agent.pid"
start(){
export OTEL_EXPORTER_OTLP_ENDPOINT=http://1.0.0.1:4317
export OTEL_EXPORTER_OTLP_ENDPOINT=http://1.0.0.1:4316
cyclone ${cyclone_args[*]} >> /var/log/cyclone.log 2>&1 && reboot &
}
EOF
Expand Down

0 comments on commit a11254a

Please sign in to comment.