Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable lan security #48

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions cmds/modules/netlightd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (

"github.com/oasisprotocol/curve25519-voi/primitives/x25519"
"github.com/pkg/errors"
"github.com/threefoldtech/zosbase/pkg/netbase/nft"
"github.com/threefoldtech/zosbase/pkg/netlight"
"github.com/threefoldtech/zosbase/pkg/netlight/bridge"
"github.com/threefoldtech/zosbase/pkg/netlight/ifaceutil"
"github.com/threefoldtech/zosbase/pkg/netlight/nft"
"github.com/threefoldtech/zosbase/pkg/netlight/public"
"github.com/threefoldtech/zosbase/pkg/netlight/resource"
"github.com/urfave/cli/v2"
Expand All @@ -34,9 +34,6 @@ const (
//go:embed nft/rules.nft
var nftRules embed.FS

//go:embed nft/lansecurity.tmpl
var securityRules string

// Module is entry point for module
var Module cli.Command = cli.Command{
Name: "netlightd",
Expand Down Expand Up @@ -114,11 +111,6 @@ func action(cli *cli.Context) error {
return fmt.Errorf("failed to apply host nft rules: %w", err)
}
rules.Close()

if err := nft.DropTrafficToLAN(securityRules); err != nil {
return fmt.Errorf("failed to drop traffic to lan: %w", err)
}

_, err = netlight.CreateNDMZBridge()
if err != nil {
return fmt.Errorf("failed to create ndmz bridge: %w", err)
Expand All @@ -142,6 +134,10 @@ func action(cli *cli.Context) error {
return fmt.Errorf("failed to setup mycelium on host: %w", err)
}

// if err := nft.DropTrafficToLAN(""); err != nil {
// return fmt.Errorf("failed to drop traffic to lan: %w", err)
// }

mod, err := netlight.NewNetworker()
if err != nil {
return fmt.Errorf("failed to create Networker: %w", err)
Expand Down
17 changes: 0 additions & 17 deletions cmds/modules/netlightd/nft/lansecurity.tmpl

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ require (
github.com/threefoldtech/tfchain/clients/tfchain-client-go v0.0.0-20241127100051-77e684bcb1b2
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3fea5e67
github.com/threefoldtech/zbus v1.0.1
github.com/threefoldtech/zosbase v0.1.3-0.20250311121639-6e42ba27c11c
github.com/threefoldtech/zosbase v0.1.3-0.20250311132434-87a5a38f424b
github.com/urfave/cli/v2 v2.17.2-0.20221006022127-8f469abc00aa
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -542,8 +542,12 @@ github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3
github.com/threefoldtech/tfgrid-sdk-go/rmb-sdk-go v0.16.1-0.20241229121208-76ac3fea5e67/go.mod h1:93SROfr+QjgaJ5/jIWtIpLkhaD8Pv8WbdfwvwMNG2p4=
github.com/threefoldtech/zbus v1.0.1 h1:3KaEpyOiDYAw+lrAyoQUGIvY9BcjVRXlQ1beBRqhRNk=
github.com/threefoldtech/zbus v1.0.1/go.mod h1:E/v/xEvG/l6z/Oj0aDkuSUXFm/1RVJkhKBwDTAIdsHo=
github.com/threefoldtech/zosbase v0.1.3-0.20250311121639-6e42ba27c11c h1:/NnPB6v4S7B4LIHr1j+JQJuoELnMBCvUoj/6OzLTfd4=
github.com/threefoldtech/zosbase v0.1.3-0.20250311121639-6e42ba27c11c/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
github.com/threefoldtech/zosbase v0.1.3-0.20250309143910-3fcfb2634aee h1:01oGDqgB3NbklhJq1NQB4bKvZBckLK6mB+Dk7C7Png0=
github.com/threefoldtech/zosbase v0.1.3-0.20250309143910-3fcfb2634aee/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
github.com/threefoldtech/zosbase v0.1.3-0.20250311105934-040947350269 h1:EIcvDBctNSsrViOwTUJjfYudSuA8NeyHZDk/hDhB7ho=
github.com/threefoldtech/zosbase v0.1.3-0.20250311105934-040947350269/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
github.com/threefoldtech/zosbase v0.1.3-0.20250311132434-87a5a38f424b h1:Kj7fGWHmVpIi2zdmVfsp+ZVVUE3PBoX07lqm5PqMCpY=
github.com/threefoldtech/zosbase v0.1.3-0.20250311132434-87a5a38f424b/go.mod h1:rxc49wA04S4IsBOYe0omVO7nu7GXridueh2PJh34gSo=
github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0=
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM=
Expand Down
Loading