Surely it is not about reinventing a wheel but a short how-to about commands I cannot remember every time.
Sometimes it is needed to make a fully quarantined machine without incoming and outgoing network access, just with
SSH connection from the local network. It can be achieved with a few firewalld / iptables commands.
RHEL 7 and CentOS 7 switched from a lot of well-known command line tools such as sysvinit, netstat, ipconfig to newer technologies (literally - systemctl, journalctl, ss, ip). Using iptables directly is not recommended too due to introducing the firewalld. Best tutorial I found is found at Digital Ocean.
Native firewalld zones do no allow outgoing traffic filtering so it is needed to add “direct” rules which are clearly iptables rules. There are also Rich rules but I have not tried them yet.
So let’s assume you are in network 192.168.1.0/255. To filter limit outgoing traffic only to IPv4 SSH connections to local network run as root: