Making outgoing IRC DCC work with NAT and XChat

This is basically a reminder to myself in case I need to set this up again, if you want to do this for more than one PC behind a NAT firewall-router, then you will of course have to use a different port range for each PC. I’m using 20 ports per PC so that I can have 20 simultaneous connection.

I’m making the assumption that your router has the ability to create a virtual servers (an inbound port range that can map to an Internal Class C Private address range). I’ve called the Virtual server below “DCC Chat Workstation”, since workstation is the hostname of my main PC (original ehh). I’ve also given it an internal and external port range of 54000 to 54019, to be forwarded to the IP address of my Workstation.

Virtual Servers

On my workstation I start the XChat IRC client, select Settings –> Preferences –>File Transfer and change the First DCC send port to 54000 then change the Last DCC send port to 54019. That will give you 20 ports to play with. Also select (tick) “Get my address from the IRC server”.

XChat - Preferences

All done. 😀

If you happen to run iptables or similar on your linux/unix box, then remember to allow the port range listed above access. If like me, your running ufw on ubuntu then the command is

sudo ufw allow proto tcp from any to any port 54000:54019

Making outgoing IRC DCC work with NAT

Leave a Reply