If you are able to connect to a ssh server, you can connect to the whole world. How does that work?
ssh -N user@remote.ssh -L 6667/target.host/6667
The command in pieces:
-N circumvents that a shell gets spawned.
user is the user on our remote ssh server.
-L is the command for the tunnel. Its three parameters are Local port, target host, target port.