How to make firewall run before login?

Hello, @zxuiji! You still haven’t mentioned what firewall software you were attempting to use. Notice one of our most helpful members bowed out because you ignored his question.

Please see:

There’s already an included service if you’re using Firewalld. See Firewalld - ArchWiki

See also: