IPFW Forward all traffic over Tor

I'm looking for a way to forward all traffic over port 9053 (Tor). I wanted to do this with ipfw, but the best I could find with it or pf was to forward all traffic over and interface. Maybe my google-fu is getting weak. Any suggestions?
 
I can not comment on your google-fu, but you may want to add to the ALIAS section of /usr/local/etc/pkg.conf
Code:
  message: "query '[%C/%n] %M'",
  rmessage: query -i "[%C/%n-%v] %M",
and then read pkg message tor{,socks}|less. It's a good idea to read through all pkg message|less, anyway.
 
It seems you are suggesting I use torsocks. I'm looking for a way to forward all traffic over tor automatically, without torsocks or proxychains. Like with pf or preferably ipfw. Any suggestions for this?
 
You need some program to wrap TCP traffic into SOCKS connections. I think the minimal thing here will be tun2socks. Or you can use OpenVPN (which does work over SOCKS5 if you do a little patching around socks-proxy-timeout; I can upload the patches).
In tun2socks case you can setup routing (wrapping tcp to socks) on another adapter and route all the TCP traffic from the source host. As I understand, you want to configure all the things from outside the host like a normal routing.
 
I'm not sure why a vpn was referenced. I know that FreeBSD is not Linux, but for clarity, I'm going to share this script for Linux that tunnels all traffic over tor. It does it all with iptables, switches the DNS to tor and prints some pretty output. I'm sure this could be done with ipfw or pf, but I'm not sure how.
 
Back
Top