Skip to content

Allow container SSH through iptables DOCKER-USER chain - #100

Merged
arush070 merged 2 commits into
mainfrom
BREV-2956/shadeform-single-container-build-fails
Mar 15, 2026
Merged

arush070 merged 2 commits into
mainfrom
BREV-2956/shadeform-single-container-build-fails

Conversation

@arush070

@arush070 arush070 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

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
Comment thread v1/providers/shadeform/firewall.go Outdated
// 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
Copy Markdown
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
Copy Markdown
Contributor 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
@arush070
arush070 merged commit 9cbd8cb into main Mar 15, 2026
9 of 10 checks passed
@arush070
arush070 deleted the BREV-2956/shadeform-single-container-build-fails branch March 15, 2026 04:41
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