It's legal if you're more than 3 miles offshore
And btw that's 3 miles out to sea from the nearest point on the US coastline, not just 3 miles from the nearest shore. Turn the y-valve, open the seacock and start the pump--or if it's a manual pump, start pumping. A tankful of waste has less impact on the environment if it's spread out over half a mile than it does all in one place, so dump while you're underway, not sitting still. I strongly recommend rinsing the tank after pumping it out OR dumping it. After dumping, pump several gallons of sea water into it through the toilet...during or after each pumpout, fill the tank at least 1/4 full with fresh water. This stirs up any sludge on the bottom so it can be pumped out. And at least every 4th or 5th pumpout, completely fill the tank with fresh water till it's overflowing out the vent...let it run till the water coming out the vent runs clear. This not only cleans out the tank, it flushes out the vent.