-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't access docker's ports except using loopback address #1506
Comments
Hi, here a few suggestions.
btw, beware of risks and side effects in Ph5.0 GA ova (photon-hw15-5.0-dde71ec57.x86_64.ova): change default root password and ssh permitrootlogin |
Using Photon OS 5.0 GA OVA system image provided in download page tried to use |
Hi @zero-custom, Are you a pen tester, hacker, cyber security engineer or a developer, devops engineer for commercial products? Accordingly to the open source licenses (-> OPEN_SOURCE_LICENSE_PHOTON_.TX), in this issue case for nmap, it is written If you wish to embed Nmap technology into proprietary software, we sell alternative licenses. I'm asking the question because docker containers and defaults for its process capabilities can be considered as proprietary software as a sufficient environment description is missing. In addition, the nmap authors have a paragraph against inappropriate usage: Nmap should never be installed with special privileges (e.g. suid root). That would open up a major security vulnerability as other users on the system (or attackers) could use it for privilege escalation. Think of it I am a volunteer user here and I do not want to give a helping hand for breaking the Photon OS EULA at all. |
neither, i just use nmap as a port state indicator, because it's straight enough to show the result. |
See #1277 |
It's iptables.I just resolved this same issue with a Homebridge container (which works best out of the box when using docker host networking). The problem was ultimately quite simple - Photon OS locks down host ports with an iptables whitelist out of the box, and by default it only permits port 22 (ssh). To permit inbound connections to a container running on Photon and using docker host networking, you must add a rule to the iptables INPUT chain. Add your rules to Example, after adding tcp port 8581 (default homebridge port)Add once via command line to test: Confirm change:
To persist the change, add a rule near the bottom of
|
Describe the bug
Using Photon OS 5.0 (OVA with virtual hardware v15)
the host can't access docker's ports.
Reproduction steps
example
docker run -p 1234:1234 alpine nc -l 1234
test 1: the host scan port on it's network address
nmap 192.168.1.xxx -p 1234
result port 1234 was filtered
test2: the host scan port on loopback address
nmap 127.0.0.1 -p 1234
result port 1234 was open
Expected behavior
expect ports opened on all network interfaces.
Additional context
No response
The text was updated successfully, but these errors were encountered: