FreeBSD 4.0 HOWTO for sockd, a SOCKS5 compliant proxy
So the time came after setting up natd, that I would need to be able to send files through
ICQ (and theoretically AIM [AOL Instant Messenger] as well). There are two ways to accomplish
this. One, specify a port range to use and then configure the ipnat to send that entire range
to an internal machine. This is a little buggy and doesn't work until ipfilter 3.4 anyway. The
other way is to utilize a SOCKS5 proxy server to reroute for you. "dante" will do the job.
cd /usr/ports/net/dante; make install clean
Once completed, we will have to set up a few rules in our sockd.conf.master
file that is in (/usr/local/etc). The external address has to be set, so what we'll do is
to have "sed" alter the sockd.conf.master every time the machine is boot.
Now it's time to set it up as a daemon. Put this file in (/usr/local/etc/rc.d)
120.sockd.sh
#!/bin/sh
WAN_IP_ADDRESS=`ifconfig -a | grep inet | cut -d " " -f2 | grep -v 192.168 | grep -v 10. | grep -v 127. | grep -v : `
sed 's/WAN_IP_ADDRESS/'$WAN_IP_ADDRESS'/' /usr/local/etc/sockd.conf.master > /usr/local/etc/sockd.conf
/usr/local/sbin/sockd -D
chmod 755 /usr/local/etc/rc.d/120.sockd.sh;/usr/local/etc/rc.d/120.sockd.sh
Now open ICQ and set it for "disconnected". Then goto ICQ/Preferences/Connection and select "I am behind
a firewall/proxy". Then choose SOCKS5 proxy and put the LAN address of your machine in (10.0.0.1 probably).
Then select next and test. It should work....this is easy stuff..
Enjoy hazard free ICQ filetransfers..
|