Your best defense is good barriers. Good barriers work around the clock. I'm in favor of permanently removing (that means kill them) any that are hunting on your land. Whether you use traps or guns is up to you and your abilities and circumstances. Removing them reduces the predator pressure on your facilities. But that is not a permanent solution. If you see one, there are more that can enter your area. Young foxes (or any other predator) are being born, raised, and weaned to go find their own hunting territory. Even if you shoot or trap one doesn't mean you got all of the ones currently hunting you land. As I said I'm in favor of removing any that you can (they are not going to go extinct) but it is not a long term solution and may not even work short term.
A trained guard dog is a deterrent while it is there. A good dog can really help. But they need to be trained and they need to be there. If they sleep inside if the weather is hot or cold they aren't doing you any good out there. If they are in another part of your property on patrol they aren't there to protect the chickens. A good dog helps a lot if you let it do its job but it's not perfect.
The kind of barriers I'm talking about are ones that keep foxes out. You might want to do an internet search of "dog climbing fence video" to get an appreciation of what you are up against. A fence doesn't help much if they can climb over it or if they can dig under it. And of course foxes aren't the only critters that can dig or climb. So think roof and a way to stop digging.
Electricity can also be very effective in stopping any digging or climbing predator if it is set up properly. There are different ways to go about that so I won't go into details but that's the route I chose. It has been extremely effective.
For what it's worth I typically remove about a dozen raccoons, several possum, and a half dozen skunk each year because they cause other problems. I have fox, dogs, coyotes, and bobcat but don't trap or shoot those. With my electric netting none of them have been a problem to my chickens.