I've just dealt with a severs fox problem around a smallholders yard. Foxes were shot at ranges from 12 to 30 yards with a 22LR. First priority is that backstops need to be sorted. You can bait against a couple of sandbags if nothing is suitable already. If you have a trail camera set it up so you know when they come, you may be surprised at what you see.
What has been said about the 17HMR is correct, shot placement is critical. A 22LR is more forgiving but art ultra-close range they tend to pencil a bit but the fox will drop within a few yards if a chest shot is taken. By the way, I wouldn't use HV 22 ammo, stick to subs at that range.
If there are cars about you can use yours as a hide, if not, stables make excellent places to shoot from, you should be able to get the foxes to go where you want them too, by baiting.