mvberg / ib-gateway-docker

Interactive Brokers Trading Gateway running in Docker
MIT License
224 stars 105 forks source link

SECURITY ISSUE: Ports are accessible from anyone on the same network and can make trades on your account #30

Open smithb1994 opened 1 year ago

smithb1994 commented 1 year ago

Port mapping with docker-compose exposes ports not only on your local machine but also to others on your network. So you're vulnerable to people making API calls to IB Gateway or accessing VNC whenever you're at a coffee shop or any other local network.

See article: https://vccolombo.github.io/blog/how-to-stop-docker-exposing-your-containers-to-the-world/

Fix: Change docker-compose ports from

ports:
  - "4003:4003"
  - "5901:5900"

To

ports:
  - "127.0.0.1:4003:4003"
  - "127.0.0.1:5901:5900"