rm firewall check

This commit is contained in:
Abhishek Kondur 2023-02-06 20:14:30 +04:00
parent 3d1e4f6ba9
commit 055ef54395

View file

@ -22,12 +22,9 @@ func CreateEgressGateway(gateway models.EgressGatewayRequest) (models.Node, erro
if err != nil {
return models.Node{}, err
}
if host.OS != "linux" && host.OS != "freebsd" { // add in darwin later
if host.OS != "linux" { // support for other OS to be added
return models.Node{}, errors.New(host.OS + " is unsupported for egress gateways")
}
if host.OS == "linux" && host.FirewallInUse == models.FIREWALL_NONE {
return models.Node{}, errors.New("firewall is not supported for egress gateways")
}
for i := len(gateway.Ranges) - 1; i >= 0; i-- {
if gateway.Ranges[i] == "0.0.0.0/0" || gateway.Ranges[i] == "::/0" {
logger.Log(0, "currently internet gateways are not supported", gateway.Ranges[i])