Browse Source

Fix hacky networking setup

tags/nilmbuntu-5
Jim Paris 4 years ago
parent
commit
99a24ae2fc
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      enter.sh

+ 2
- 1
enter.sh View File

@@ -26,7 +26,7 @@ setup_networking() {

# However, the current systemd-networkd from Debian is broken and
# won't enable masquerading -- so do it manually
IFACE=$(ip -4 route list default | awk '{print $5}')
IFACE=$(ip -4 route list default | head -1 | awk '{print $5}')
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -D POSTROUTING -o $IFACE -j MASQUERADE >/dev/null || true
iptables -t nat -A POSTROUTING -o $IFACE -j MASQUERADE
@@ -99,6 +99,7 @@ run() {

set -e

setup_networking
start_container

run "resolvconf --disable-updates"


Loading…
Cancel
Save