iperf -c 192.168.3.2 -i 2
connect failed: Connection refused
3.2 is another machine. I think the port might be blocked.
How can I make this work?
I'd doubt that this is a firewall issue. Usually, firewalls employ the DROP rule for packets that are not allowed. A connection refused means that there is no application listening on the port it tries to connect to. The destination hosts indicates this with a corresponding ICMP message to the source.
In order to run iperf you must have a server running on the machine in which you iperf to. To do this run
After running this you will get an ouput that looks something like this:
Try turning off any firewall on the machines. On many linux distros, you can do
to disable the firewall.