mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: enable both ipv4 and ipv6 forwarding
This commit is contained in:
parent
58ca59bc6f
commit
e5f8c168c3
1 changed files with 5 additions and 2 deletions
|
@ -9,8 +9,8 @@ import (
|
|||
"github.com/bettercap/bettercap/core"
|
||||
"github.com/bettercap/bettercap/network"
|
||||
|
||||
"github.com/evilsocket/islazy/str"
|
||||
"github.com/evilsocket/islazy/fs"
|
||||
"github.com/evilsocket/islazy/str"
|
||||
)
|
||||
|
||||
type LinuxFirewall struct {
|
||||
|
@ -66,9 +66,12 @@ func (f LinuxFirewall) IsForwardingEnabled() bool {
|
|||
func (f LinuxFirewall) EnableForwarding(enabled bool) error {
|
||||
if err := f.enableFeature(IPV4ForwardingFile, enabled); err != nil {
|
||||
return err
|
||||
} else if fs.Exists(IPV6ForwardingFile) {
|
||||
}
|
||||
|
||||
if fs.Exists(IPV6ForwardingFile) {
|
||||
return f.enableFeature(IPV6ForwardingFile, enabled)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue