linuxserver / docker-baseimage-fedora

GNU General Public License v3.0
4 stars 2 forks source link

[BUG] iptables not found in PATH #27

Closed bpmooch closed 11 months ago

bpmooch commented 1 year ago

Is there an existing issue for this?

Current Behavior

iptables could not be found in PATH in the fedora baseimage container preventing the "router" from initializing

Expected Behavior

The container shouldn't print an error on a loop

Steps To Reproduce

Run the following script:

#!/bin/bash

set -ex

docker run \
  --rm \
  -v foobar-tailscale:/var/lib/tailscale \
  -e TAILSCALE_STATE_DIR=/var/lib/tailscale \
  -e TAILSCALE_SERVE_PORT=3000 \
  -e TAILSCALE_SERVE_MODE=https \
  -e TAILSCALE_USE_SSH=1 \
  -e TAILSCALE_HOSTNAME=foobar \
  -e TAILSCALE_AUTHKEY="$TAILSCALE_AUTH_KEY" \
  -e DOCKER_MODS=ghcr.io/tailscale-dev/docker-mod:main \
  --name foobar-test-container \
  -it \
  --cap-add=NET_ADMIN \
  --cap-add=NET_RAW \
  -v /dev/net/tun:/dev/net/tun \
  lsiobase/fedora:38-version-38 \
  sh

Environment

- OS: Ubuntu 22.04
- How docker service was installed: https://docs.docker.com/engine/install/ubuntu/

Docker creation

docker run \
  --rm \
  -v foobar-tailscale:/var/lib/tailscale \
  -e TAILSCALE_STATE_DIR=/var/lib/tailscale \
  -e TAILSCALE_SERVE_PORT=3000 \
  -e TAILSCALE_SERVE_MODE=https \
  -e TAILSCALE_USE_SSH=1 \
  -e TAILSCALE_HOSTNAME=foobar \
  -e TAILSCALE_AUTHKEY="$TAILSCALE_AUTH_KEY" \
  -e DOCKER_MODS=ghcr.io/tailscale-dev/docker-mod:main \
  --name foobar-test-container \
  -it \
  --cap-add=NET_ADMIN \
  --cap-add=NET_RAW \
  -v /dev/net/tun:/dev/net/tun \
  lsiobase/fedora:38-version-38 \
  sh

### Container logs

```bash
[mod-init] Attempting to run Docker Modification Logic
[mod-init] Adding tailscale-dev/docker-mod:main to container
[mod-init] Downloading tailscale-dev/docker-mod:main from ghcr.io
[mod-init] Installing tailscale-dev/docker-mod:main
[mod-init] tailscale-dev/docker-mod:main applied to container
[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────
  _____ __ __ _____ _____ _____ _____
 |     |  |  |   __|_   _|     |     |
 |   --|  |  |__   | | | |  |  | | | |
 |_____|_____|_____| |_| |_____|_|_|_|
       _____ __ __ _ __    ____
      | __  |  |  | |  |  |    \
      | __ -|  |  | |  |__|  |  |
      |_____|_____|_|_____|____/

  Based on images from linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

/run/s6-rc:s6-rc-init:PICcNo/servicedirs/s6rc-oneshot-runner /run/s6-rc:s6-rc-init:PICcNo/servicedirs/s6rc-oneshot-runner
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2783  100  2783    0     0  29913      0 --:--:-- --:--:-- --:--:-- 30250
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 24.2M  100 24.2M    0     0  55.3M      0 --:--:-- --:--:-- --:--:-- 55.4M
'tailscale_1.48.2_amd64/tailscale' -> '/usr/bin/tailscale'
'tailscale_1.48.2_amd64/tailscaled' -> '/usr/sbin/tailscaled'
/run/s6-rc:s6-rc-init:PICcNo/servicedirs/s6rc-oneshot-runner
[!] TAILSCALE_AUTHKEY is not defined, this will print a login URL to the screen
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
logpolicy.ConfigFromFile /var/lib/tailscale/tailscaled.log.conf: open /var/lib/tailscale/tailscaled.log.conf: no such file or directory
logpolicy.Config.Validate for /var/lib/tailscale/tailscaled.log.conf: config is nil
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
failed to connect to local tailscaled; it doesn't appear to be running
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getting serve config: 503 Service Unavailable: no backend
[custom-init] No custom files found, skipping...
[ls.io-init] done.
sh-5.2# getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
logtail started
Program starting: v1.48.2-ta6bcfd691-g62c580b04, Go 1.21.0: []string{"tailscaled", "--statedir=/var/lib/tailscale"}
LogID: 6b3f52947b94d48063ba5f87c18f173a563c26cb19b10cb3cb2f1d64cdb448a4
logpolicy: using system state directory "/var/lib/tailscale"
wgengine.NewUserspaceEngine(tun "tailscale0") ...
router: default choosing iptables
router: using iptables
wgengine.NewUserspaceEngine(tun "tailscale0") error: creating router: exec: "iptables": executable file not found in $PATH
flushing log.
logger closing down
getLocalBackend error: createEngine: creating router: exec: "iptables": executable file not found in $PATH
exit
exit
exit
github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

thespad commented 1 year ago

iptables is not installed as part of the default fedora packages (nor is it directly available as they use nftables). You'll need to install nftables and one of the iptables compatibility shims if you want to be able to use it.

LinuxServer-CI commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 11 months ago

A human has marked this issue as invalid, this likely happened because the issue template was not used in the creation of the issue.

github-actions[bot] commented 10 months ago

This issue is locked due to inactivity