Skip to content

Allow configurable docker network (assists firewalling) - #282

Open
dkopko wants to merge 1 commit into
eugr:mainfrom
dkopko:configurable-docker-network
Open

dkopko wants to merge 1 commit into
eugr:mainfrom
dkopko:configurable-docker-network

Conversation

@dkopko

@dkopko dkopko commented Jun 11, 2026

Copy link
Copy Markdown

This leaves the default of --network host but allows override. Being restricted to --network host makes certain firewall setups difficult/impossible, if one wanted to setup their host as DMZ accessible to the wider internet.

For example, allowing non-host networking and using a port serving argument like -p 127.0.0.1:7000:8000 along with the following /etc/nftables.conf firewall setup can allow setups where only SSH-forwarded ports are allowed to connect to the vLLM instance:

table inet docker_lockdown {
  chain preraw {
    #must run AFTER Docker DNAT (which is priority -100)
    type filter hook prerouting priority -50;

    # If traffic was DNATed (i.e. on a Docker-published port),
    # and destination is NOT loopback (i.e. it was pointed to us from outside), drop it
    ct status dnat ip daddr != 127.0.0.0/8 drop
    ct status dnat ip6 daddr != ::1 drop
  }
}

@dkopko dkopko changed the title Allow configurable docker network Allow configurable docker network (assists firewalling) Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant