iperf3: error - unable to connect to server: Permission denied


I was running iperf between two FreeBSD VMs on OrionVM for some bandwidth benchmarking, like a gentleman. I did this on the server and client:

server# iperf3 -s
client# iperf3 -c $SERVER_IP

But I got this:

iperf3: error - unable to connect to server: Permission denied

Permission denied? Since when did iperf include authentication? I couldn’t find a single other example of this anywhere. What the flipping dolphin was going on?

Then I remembered the afternoon coffee didn’t kick in.

# service ipfw stop

Yup, the firewall was blocking it. Despite what the error suggests, it had nothing to do with iperf. A better message would have been service blocked, but I’m just happy it works now, and nobody ever need know I did something so embarrassing.

(Note that you’ll want to temporarily open a port, rather than taking your whole firewall down. I just did that as a sanity check. But you knew that already, because you’re a responsible system administrator).

Author bio and support


Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!