Tunneling

Just looking to see if tunneling around or underneath a enemy base is legal or not.

On PvP yes. It is the responsibility of the defender to build a 360° defense system.

In PvE it might count as griefing if you try to collapse the base of the other player with that tactic and will be punished hard.