Skip to content

Commit ba6aa2b

Browse files
committed
allow established before lo
1 parent f7c4e3b commit ba6aa2b

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

v1/providers/nebius/instance.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1796,8 +1796,8 @@ func generateUFWCommands(firewallRules v1.FirewallRules) []string {
17961796
func generateIPTablesCommands() []string {
17971797
commands := []string{
17981798
"iptables -F DOCKER-USER",
1799-
"iptables -A DOCKER-USER -i lo -j ACCEPT",
18001799
"iptables -A DOCKER-USER -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT",
1800+
"iptables -A DOCKER-USER -i lo -j ACCEPT",
18011801
"iptables -A DOCKER-USER -j DROP",
18021802
"iptables -A DOCKER-USER -j RETURN", // Expected by Docker
18031803
}

v1/providers/shadeform/firewall.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const (
1616
ufwForceEnable = "ufw --force enable"
1717

1818
ipTablesResetDockerUserChain = "iptables -F DOCKER-USER"
19-
ipTablesAllowDockerUserInpboundLoopback = "iptables -A DOCKER-USER -i lo -j ACCEPT"
2019
ipTablesAllowDockerUserOutbound = "iptables -A DOCKER-USER -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT"
20+
ipTablesAllowDockerUserInpboundLoopback = "iptables -A DOCKER-USER -i lo -j ACCEPT"
2121
ipTablesDropDockerUserInbound = "iptables -A DOCKER-USER -j DROP"
2222
ipTablesReturnDockerUser = "iptables -A DOCKER-USER -j RETURN"
2323
)
@@ -62,8 +62,8 @@ func (c *ShadeformClient) getUFWCommands(firewallRules v1.FirewallRules) []strin
6262
func (c *ShadeformClient) getIPTablesCommands() []string {
6363
commands := []string{
6464
ipTablesResetDockerUserChain,
65-
ipTablesAllowDockerUserInpboundLoopback,
6665
ipTablesAllowDockerUserOutbound,
66+
ipTablesAllowDockerUserInpboundLoopback,
6767
ipTablesDropDockerUserInbound,
6868
ipTablesReturnDockerUser, // Expected by Docker
6969
}

0 commit comments

Comments
 (0)