In active DCC, your client connects to the remote client that is serving the file.
In passive DCC, your client will open a port that the remote client connects to to send the file.
Passive DCC support landed in irssi in v0.8.10.
Here’s how you enable it:
1.a) set dcc_port in irssi to the port range you will be using
/set dcc_port 12345 12347
1.b) forward these same ports in your router to your irssi client machine
2.a) set dcc_own_ip in irssi to your external ip
/set dcc_own_ip 18.104.22.168
2.b) if you’re using a NAT setup in linux, set
net.ipv4.ip_nonlocal_bind = 1 in /etc/sysctl.conf
Not sure if this is also needed:
/set dcc_autoaccept_lowports ON
It looks like irssi can’t handle changing automatically between passive and active DCC.
So you need to run
/unset dcc_own_ip and
/set dcc_port 0 to go back to using active DCC.
irssi aliases to help with that:
/alias pdcc /set dcc_own_ip 22.214.171.124;/set dcc_port 12345 12347
/alias adcc /unset dcc_own_ip;/set dcc_port 0