From 78b47dac0d94dd5eedfac6f99bb608ee918f5a4c Mon Sep 17 00:00:00 2001 From: Dmitry Shihovtsev Date: Mon, 24 Feb 2020 14:30:08 +0600 Subject: [PATCH 1/2] Add ipset dependency for DEB packages --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 014365ad13..4131a68ed4 100644 --- a/debian/control +++ b/debian/control @@ -22,6 +22,7 @@ Depends: resolvconf, openvpn (>= 2.4.0), ca-certificates, + ipset, iptables, iproute2, wireguard, From c73888f508509c3270584904a9c11d194a783680 Mon Sep 17 00:00:00 2001 From: Dmitry Shihovtsev Date: Mon, 24 Feb 2020 14:33:38 +0600 Subject: [PATCH 2/2] Do not use absolute path for ipset --- bin/package/sudoers/mysterium-node | 1 + firewall/ipset/ipset.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/package/sudoers/mysterium-node b/bin/package/sudoers/mysterium-node index 048b21cefc..206f97dfdc 100644 --- a/bin/package/sudoers/mysterium-node +++ b/bin/package/sudoers/mysterium-node @@ -3,6 +3,7 @@ mysterium-node ALL=NOPASSWD: /sbin/sysctl mysterium-node ALL=NOPASSWD: /sbin/iptables mysterium-node ALL=NOPASSWD: /usr/sbin/ipset +mysterium-node ALL=NOPASSWD: /sbin/ipset mysterium-node ALL=NOPASSWD: /sbin/ip mysterium-node ALL=NOPASSWD: /etc/mysterium-node/prepare-env.sh mysterium-node ALL=NOPASSWD: /sbin/tc diff --git a/firewall/ipset/ipset.go b/firewall/ipset/ipset.go index 07577c8c3e..5aec87605b 100644 --- a/firewall/ipset/ipset.go +++ b/firewall/ipset/ipset.go @@ -29,7 +29,7 @@ import ( var Exec = defaultExec func defaultExec(args []string) ([]string, error) { - args = append([]string{"sudo", "/usr/sbin/ipset"}, args...) + args = append([]string{"sudo", "ipset"}, args...) output, err := cmdutil.ExecOutput(args...) if err != nil { return nil, errors.Wrap(err, "ipset cmd error")