Iptables: block all traffic except SSH

I needed to update some servers and block traffic generated by a lot of services. Since I couldn’t block every single service neither disconnect the network, I used this simple iptables rule: iptables -A INPUT -p tcp -m state –state NEW -m multiport ! –dports 22 -j REJECTiptables -A INPUT -p tcp -m state –state… Continue reading “Iptables: block all traffic except SSH”

Adding a secondary IP address (CentOS, Fedora, RHEL)

You will┬ánot need a secondary NIC but you’ll create virtual adapters as the secondary IP will be routing through the primary. Network configurations are stored in /etc/sysconfig/network-scripts network-scripts$ ls -l | grep ifcfg -rw-r–r–. 1 root root 304 Nov 11 19:04 ifcfg-eth0 -rw-r–r–. 1 root root 254 May 25 2017 ifcfg-lonetwork-scripts$ ls -l | grep… Continue reading “Adding a secondary IP address (CentOS, Fedora, RHEL)”