You can use a Shield Capacitor to completely block attacks from other commanders on your Space Station temporarily.

You can also upgrade your fleets and defense capabilities to discourage enemy attacks.

Being in a powerful alliance will further discourage enemy commanders from making attacks for the risk of a brutal counterattack from your alliance comrades.

Be aware that if you send your fleets to defend buildings/stations, or scout/attack other players or alliance buildings, any Shield Capacitor you have activated will be cancelled instantly.