I'm posting from Japan. I'm not very good at English, so I'm sorry if I'm asking rude questions.
I'm using AWS EC2 to build a server.
I am familiar with using AWS SecurityGroup and NACL.
This time I also need to configure the Firewall for the Linux OS on my EC2 at the same time.
I am using SSM to connect to the EC2 instance.
I want to control the OUTPUT of the Linux OS Firewall. It looks like this. Example)
Rule 1 *. *. *. */* to port ** is allowed
Rule 2 *. *. *. */* to port ** is allowed
Except for rules 1 and 2, all outputs are rejected.
The command [firewall-cmd --direct add-rule ipv4 filter OUTPUT ] is used.
I don't know about allowing return packets or the number of OUTPUTs either. Does anyone please help me?
I appreciate your help, Thank you.