Federal lists several acceptable methods
If your toilet is connected to a holding tank, acceptable methods of securing the device include --(1) Closing each valve (y-valve or seacock) leading to an overboard discharge and removing the handle;(2) Padlocking each valve leading to an overboard discharge in the closed position; or(3) Using a non-releasable wire-tie to hold each valve leading to an overboard discharge in the closed position.(2 and 3 may require drilling a hole in the handle to put a wire through) If your toilet is connected to a Type I or II MSD (treatment device), acceptable methods of securing the device include --(1) Closing the seacock and removing the handle;(2) Padlocking the seacock in the closed position;(3) Using a non-releasable wire-tie to hold the seacock in the closed position; or(4) Locking the door to the space enclosing the toilets with a padlock or door handle key lock.Inland may be another story. The Great Lakes and all non-navigable inland lakes are “no discharge” waters. They’re also a loooong way from the ocean. Since there's no possible way to legally use a y-valve or macerator to dump a tank, many states have made it illegal for vessels operating on these waters even to have one or both installed. When in doubt, check with your local authorities.