# Bridge obfs4proxy permission error

**URL:** https://forum.torproject.org/t/bridge-obfs4proxy-permission-error/6684
**Category:** Relay Operator
**Created:** [February 24, 2023, 9:46pm UTC](https://forum.torproject.org/t/bridge-obfs4proxy-permission-error/6684 "2023-02-24T21:46:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![facebita](https://forum.torproject.org/user_avatar/forum.torproject.org/facebita/32/1023_2.png) [@facebita](https://forum.torproject.org/u/facebita)
#### Post date: [February 24, 2023, 9:46pm UTC](https://forum.torproject.org/t/bridge-obfs4proxy-permission-error/6684/1 "2023-02-24T21:46:25Z")

</div>

> [@Guard is failing a very large amount of circuits](https://forum.torproject.org/t/guard-is-failing-a-very-large-amount-of-circuits/6538/13):
>
> cat /var/lib/tor/stats/bridge-stats

```auto
$ sudo cat /var/lib/tor/stats/bridge-stats
bridge-stats-end 2023-02-24 19:19:21 (86400 s)
bridge-ips de=8
bridge-ip-versions v4=8,v6=0
bridge-ip-transports <OR>=8

```

And the log file you’ll find as attachement.  
[redacted]

---

<div class="post-metadata">

### Author: ![gus](https://forum.torproject.org/user_avatar/forum.torproject.org/gus/32/16_2.png) [@gus](https://forum.torproject.org/u/gus)
#### Post date: [February 24, 2023, 10:29pm UTC](https://forum.torproject.org/t/bridge-obfs4proxy-permission-error/6684/2 "2023-02-24T22:29:13Z")

</div>

Alright, first things first, let’s fix this error:

```auto
Feb 24 20:29:27 Tor[551]: Server managed proxy encountered a method error. (obfs4 listen tcp 0.0.0.0:443: bind: permission denied)
Feb 24 20:29:27 Tor[551]: Managed proxy at '/usr/bin/obfs4proxy' failed the configuration protocol and will be destroyed.

```

It means that the pluggable transport `obfs4` is installed, but it needs some special permission to run.

From the Tor Community portal, Tor [bridge documentation](https://community.torproject.org/relay/setup/bridge/debian-ubuntu/):

> If you decide to use a fixed obfs4 port smaller than 1024 (for example 80 or 443), you will need to give obfs4 CAP\_NET\_BIND\_SERVICE capabilities to bind the port with a non-root user:

So, to fix this permission error, you can change the OBSF4 Port in your torrc to something higher like 55555, or run follow the instructions below.

1. Run command in your terminal:

```auto
sudo setcap cap_net_bind_service=+ep /usr/bin/obfs4proxy

```

1. You will also need to change your systemd hardening, for example:

```auto
sudo gedit /lib/systemd/system/tor@default.service

```

And set this line:

> NoNewPrivileges=no

1. Now, you need to do the same thing here:

```auto
sudo gedit /lib/systemd/system/tor@.service

```

And set this line:

> NoNewPrivileges=no

1. Finally, restart your Tor daemon:

```auto
sudo systemctl daemon-reload

```

To confirm that you fixed this issue, you can search your bridge fingerprint on [Tor Metrics](https://metrics.torproject.org/rs.html#details/CA39A0DD187313930099F0BD470E5EA676EB85C0) – you need to wait 3 hours to see this update on Metrics – and you will find a line confirming that you have obfs4 pluggable transport: **“Transport protocols obfs4”.** And you should not see that error in your logs anymore.  
By fixing this error, your bridge will be [distributed by moat - see this bug](https://gitlab.torproject.org/tpo/anti-censorship/rdsys/-/issues/63).

After you fix this, I will follow up with you to fix two other issues: obfs4proxy version (you must use the package from bullseye-backports) and Tor version (0.4.7.x instead of 0.4.5 - EOL).

---

<div class="post-metadata">

### Author: ![facebita](https://forum.torproject.org/user_avatar/forum.torproject.org/facebita/32/1023_2.png) [@facebita](https://forum.torproject.org/u/facebita)
#### Post date: [March 11, 2023, 4:57pm UTC](https://forum.torproject.org/t/bridge-obfs4proxy-permission-error/6684/3 "2023-03-11T16:57:33Z")

</div>

Thank you very much, and sorry for the delay. There was something with more priority in my life. But now I have followed your steps. The three hours you mentioned at the end will being finished at 4 p.m. CET. Then I will check TorMetrics and will come back here for learning next steps.

ADDENDUM:

It’s now 9 p.m. CET. But TorMetrics remains reporting:

Transport protocols  
none
