You can use a Quantum Shield 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 a member of 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 Quantum Shield you have active will be cancelled instantly.