Skip to content

Allow container SSH through iptables DOCKER-USER chain#100

Open
arush070 wants to merge 2 commits intomainfrom
BREV-2956/shadeform-single-container-build-fails
Open

Allow container SSH through iptables DOCKER-USER chain#100
arush070 wants to merge 2 commits intomainfrom
BREV-2956/shadeform-single-container-build-fails

Conversation

@arush070
Copy link

@arush070 arush070 commented Mar 9, 2026

This PR addresses the issue where containers on Shadeform and its sub-providers were unable to build or accept SSH connections due to an iptables rule that dropped inbound traffic to Docker containers.

The change allows traffic to reach container SSH mapped via VM port 2222 → container port 22, while keeping existing protections that block other container ports from the internet.

Related Ticket

@arush070 arush070 self-assigned this Mar 9, 2026
@arush070 arush070 marked this pull request as ready for review March 10, 2026 05:15
@arush070 arush070 requested a review from a team as a code owner March 10, 2026 05:15
// Allow inbound traffic on the loopback interface.
ipTablesAllowDockerUserInpboundLoopback = "iptables -A DOCKER-USER -i lo -j ACCEPT"

// Allow external inbound to container SSH (dport 22 because Docker DNAT rewrites host:2222 -> container:22).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be more correct to state that this is opening up any traffic to 22, not just 2222

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drewmalin We have updated the comment with a more clear scope Can we get a quick review and merge on this PR.

Thanks in Advance!

drewmalin
drewmalin previously approved these changes Mar 10, 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.

2 participants