The best defence against rabbits is a metre-high chicken-wire fence (1-inch mesh or smaller) with another 6 inches buried in the soil.
However its not the only solution, here are some others methods that could lead to rabbits losing interest in your garden.

Odour Repellents
Odour repellents such as blood meal or powdered fox urine are available at your local garden centre. These usually need to be reapplied frequently. Spray-on taste repellents such as hot pepper spray are also available. It must be put directly on the plants, so rabbits get a good taste of it when they settle in for their snack. It also needs to be reapplied periodically.
Row Cover
Placing a row cover over your beds while the plants are small is a good way to keep rabbits away, be sure to remove it once new growth is well underway. Because rabbits prefer tender, young growth, try keeping your flowers covered for a few weeks in spring, then switching to an odour or taste repellent when the covers are removed.
You may also like
5 eco-friendly pest control solutions
How to get rid of rats in your garden without poison or traps
This article originally appeared on www.bhg.com