# Unable to create iptables when starting a Private Network

**URL:** <https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675>\
**Category:** Pritunl VPN\
**Tags:** pritunl\
**Created:** [January 10, 2023, 1:47am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675 "2023-01-10T01:47:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 10, 2023, 1:47am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/1 "2023-01-10T01:47:43Z")

</div>

I’ve recently activated my copy of the Pritunl Enterprise VPN account. And I’ve created the server and setup a private network to access my server remotely. This can be done by routing the server subnet to the VPN server as stated in the Pritunl instructions.

> **[Accessing a Private Network](https://docs.pritunl.com/docs/accessing-a-private-network)**
>
> Securing access to a private network with Pritunl

The VPN server will start. However, nothing will display on the Server Output tab of the web portal. But when I check the log in the Pritunl log file. I get the following error

```auto
[snowy-plains-5952][2023-01-10 01:36:46,749][ERROR] Server error occurred while running
Traceback (most recent call last):
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/server/instance.py", line 1582, in _run_thread
    self.iptables.upsert_rules()
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/iptables.py", line 1411, in upsert_rules
    self._insert_iptables_rule(rule, tables=tables)
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/iptables.py", line 1229, in _insert_iptables_rule
    return self._insert_iptables_rule_cmd(rule, ipv6)
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/iptables.py", line 1211, in _insert_iptables_rule_cmd
    utils.Process(
  File "/usr/lib/pritunl/lib/python3.9/site-packages/pritunl-1.30.3388.46-py3.9.egg/pritunl/utils/proc.py", line 88, in run
    raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command '['iptables', '-I', 'INPUT', '-i', 'tun4', '-m', 'set', '--match-set', '63bcc12c5eb9da02e3aaa815_or', 'dst', '-j', 'ACCEPT', '-m', 'comment', '--comment', 'pritunl-63bcbb5d5eb9da02e3aaa3d7']' returned non-zero exit status 2.
  server_id = "21bcbb5d5eb9da02e3aaa3d7"
  instance_id = "63bcc12c5eb34a02e3aaa815"
[snowy-plains-5952][2023-01-10 01:36:46,750][ERROR] Popen returned error exit code
  cmd = ["iptables", "-I", "INPUT", "-i", "tun4", "-m", "set", "--match-set", "63bcc12c5eb9da02e3aaa815_or", "dst", "-j", "ACCEPT", "-m", "comment", "--comment", "pritunl-63bcbb5d5eb9da02e3aaa3d7"]
  timeout = 15
  return_code = 2

```

What are the potential issues causing this problem? And what are the possible solutions?

Thanks,

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 10, 2023, 3:49am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/2 "2023-01-10T03:49:41Z")

</div>

What Linux distribution and version is the server running on?

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 10, 2023, 4:11am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/3 "2023-01-10T04:11:25Z")

</div>

Raspberry Pi OS ARM64 Bullseye

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 10, 2023, 4:12am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/4 "2023-01-10T04:12:21Z")

</div>

v1.30.3388.46

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 10, 2023, 10:05am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/5 "2023-01-10T10:05:30Z")

</div>

This issue is caused by the platform, the software is only built and tested on x86.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 10, 2023, 1:07pm UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/6 "2023-01-10T13:07:05Z")

</div>

Well some ARM64 images have been built for pritunl using Docker successfully.

[https://hub.docker.com/layers/goofball222/pritunl/1.30.3292.22/images/sha256-23e334dc339615741a68bdb39635eafbbc67e590e5594221aef9783106ba7763?context=explore](https://hub.docker.com/layers/goofball222/pritunl/1.30.3292.22/images/sha256-23e334dc339615741a68bdb39635eafbbc67e590e5594221aef9783106ba7763?context=explore)

There are some guides that also exist, teaching you how to compile for ARM64.

> **[Turn a Raspberry Pi 3B+ into a PriTunl VPN](https://opensource.com/article/19/1/pritunl-vpn-raspberry-pi)**
>
> PriTunl is a VPN solution for small businesses and individuals who want private access to their network.

I’m not convince that it is the platform issue.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 10, 2023, 2:44pm UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/7 "2023-01-10T14:44:33Z")

</div>

Also iptables is a an architecture/platform independent command line tools.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 11, 2023, 5:12am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/8 "2023-01-11T05:12:01Z")

</div>

The issue only arises when you create a private network. Starting the server with the default settings does not present any issue.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 11, 2023, 11:24pm UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/9 "2023-01-11T23:24:46Z")

</div>

It’s an issue with the iptables on that system. Possibly missing support for ipset. The error message should include `Process stderr` to provide additional information.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 11, 2023, 11:37pm UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/10 "2023-01-11T23:37:01Z")

</div>

ipset was installed using apt. There is no additional information about the error on the Pritunl log sheet.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 11, 2023, 11:49pm UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/11 "2023-01-11T23:49:05Z")

</div>

I tried pasting the command into the CMD line and got the following error.

iptables v1.8.7 (nf\_tables): Couldn’t load match `set’:No such file or directory

I’ve used

```auto
ipset list

```

and got no set listed. It looks like ipset is not creating the required IP set for iptables to process.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 11, 2023, 11:59pm UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/12 "2023-01-11T23:59:32Z")

</div>

It looks like Pritunl uses the same IPset name every time. Putting the `NAT` address into that IP set should perform the intended behavior of forwarding the private network to the client devices?

EDIT: The name slightly changes every time.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 12, 2023, 12:16am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/13 "2023-01-12T00:16:39Z")

</div>

It is listed temporarily and then deleted after the error is written on the log.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 12, 2023, 12:32am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/14 "2023-01-12T00:32:37Z")

</div>

It keeps giving me this error.

```auto
iptables v1.8.7 (nf_tables): Couldn't load match `set':No such file or directory

```

It looks like iptables is not detecting the ipset groups despite already being installed on the same system.

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 12, 2023, 12:40am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/15 "2023-01-12T00:40:24Z")

</div>

I can’t find anything on the internet to resolve this issue. It looks like iptables is not detecting ipset. Could it be a kernel issue?

---

<div class="post-metadata">

**Author:** ![cat8402](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/c/f6c823/32.png) [@cat8402](https://forum.pritunl.com/u/cat8402)\
**Post date:** [January 12, 2023, 12:50am UTC](https://forum.pritunl.com/t/unable-to-create-iptables-when-starting-a-private-network/675/16 "2023-01-12T00:50:07Z")

</div>

> <https://unix.stackexchange.com/questions/709798/iptables-couldnt-load-ipset-match>

It look like my system did not loan the ip\_set kernel module.

EDIT: xt\_set
