V
V
vlzemtsov2018-01-11 20:47:30
linux
vlzemtsov, 2018-01-11 20:47:30

How to control outgoing connections with firewalld?

Good afternoon.
Available: CentOS 7 + firewalld
Setting up inbound connections with zones and rules is easy and hassle free.
However! How to set up strict control of outgoing connections?
For example, I want this particular machine to be able to connect on port 666 to a neighboring machine (let's say 192.168.1.2), but not be able to connect to anyone else on port 666. Is it possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Strabbo, 2018-01-11
@Strabbo

Perhaps something like this: firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT + add the ip to which you are connecting + port and add a second drop rule to drop other packets.
If you do the config remotely, don't block yourself :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question