Glorious1
Guru
- Joined
- Nov 23, 2014
- Messages
- 1,211
Thank you nickt! This is brilliant! I know it's been a while, but I've been banging my head against the wall for a day and a half trying to get these rules to work. Your solution is simple, and it works. I can do anything in the jail, transmission works, I can access it via the GUI remote, but when openvpn stops, transmission traffic comes to a screeching halt. Perfect!Like others, I also wanted to ensure that transmission could only use the VPN. But I just couldn't get my head around the IPFW rules discussed in this thread. So I thought I'd try something a little simpler based on binding the transmission user to specific adapters. Here is what I came up with:
Code:ipfw -f flush ipfw -q add 00010 allow ip from any to any via tun0 ipfw -q add 00101 allow ip from me to 10.0.0.0/24 via epair0b uid transmission ipfw -q add 00102 allow ip from 10.0.0.0/24 to me via epair0b uid transmission ipfw -q add 00103 deny ip from any to any via epair0b uid transmission ipfw -q add 65535 allow all from any to any
The first rule isn't really needed, but it means that I get statistics on how much the VPN is being used when i do a ipfw show, which is a nice confirmation that the VPN is being used. Note that my LAN subnet/mask is 10.0.0.0/24.
It works!
FYI, after restarting, I found that my epair0b interface was now epair2b. So I simply removed "via epair0b" from all the above. Hopefully that will still do the job?
Last edited: