Firewalla Gold - Port forwarding on Docker container port or IP
Hi,
I am a very happy user of Firewalla Gold running version 1.971 in a router mode.
Running Docker containers on Gold has opened doors for a lot of potentials depending on use cases. One of my use case is to run a SSH server (strip down, hardened with fail2ban) container and expose port 2222 to outside world.
I have successfully deployed container and binded (published) port 2222 at the time of starting docker container. Now I am unable to find a way to do port forwarding via GUI as it does not list my primary lan IP (192.168.xxx.1).
I also tried Macvlan driver for network interface and assigned my container a dedicated IP (192.168.xxx.22) but unfortunately even this IP is also not available via GUI for port forwarding.
Is there anyway to expose a containers port to outside world?
Thank you very much in advance!!
-
For docker port mapping, you will need to use docker to map them see this here
https://docs.docker.com/config/containers/container-networking/
After you have done this, you will need to put an allow rule for that particular port. This will give your traffic a way into the system from the ingress firewall
-
Hi,
I have already setup port mapping by publishing port 2222:2222 and verified the same as below.
user@firewalla:~# nc -v 192.168.54.1 2222
Connection to 192.168.54.1 2222 port [tcp/*] succeeded!
SSH-2.0-OpenSSH_8.3
^CI need little help to understand where and how to put an allow rule for this particular port. I am looking to allow this port to be accessible from Internet as well as from local network.
Thank you!!
-
Yes, I tried that as below without any luck.
tap on rules
tap on + to add rules
Action ==> Allow
Matching ==> Set a Target ==> Report Port ==> 2222
ON ==> Select a Device ==> All Devices (Not sure if I can try anything else)
Even after this rule in place, I can't hit port 2222 from internet or LAN.Thanks again for your help!!
Please sign in to leave a comment.
Comments
7 comments