mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-25 16:59:20 +08:00
feat: Add UDP port 443 acceptance rule to firewall and iptables configuration
This commit is contained in:
parent
74f29e3dc3
commit
dc47eb5ae4
2 changed files with 6 additions and 0 deletions
|
|
@ -711,6 +711,9 @@ func (u *FirewallService) addPortsBeforeStart(client firewall.FirewallClient) er
|
|||
if err := client.Port(fireClient.FireInfo{Port: "443", Protocol: "tcp", Strategy: "accept"}, "add"); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := client.Port(fireClient.FireInfo{Port: "443", Protocol: "udp", Strategy: "accept"}, "add"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return client.Reload()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,6 +363,9 @@ func initPreRules() error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
if err := iptables.AddRule(iptables.FilterTab, iptables.Chain1PanelBasicAfter, fmt.Sprintf("-p udp -m udp --dport 443 -j ACCEPT")); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := iptables.AddRule(iptables.FilterTab, iptables.Chain1PanelBasicAfter, iptables.DropAllTcp); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue