firewalld
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| firewalld [2018/08/08 13:23] – [Firewalld] k2patel | firewalld [2020/08/10 02:35] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| Anyway but server need to keep rolling !! | Anyway but server need to keep rolling !! | ||
| + | |||
| + | ==== Replace firewalld with iptables ==== | ||
| + | This is tested with the RHEL7 | ||
| + | <code bash> | ||
| + | yum install -y iptables-services | ||
| + | iptables-save > / | ||
| + | systemctl stop firewalld | ||
| + | systemctl mask firewalld | ||
| + | systemctl enable iptables | ||
| + | systemctl enable ip6tables | ||
| + | systemctl start iptables | ||
| + | systemctl start ip6tables | ||
| + | </ | ||
| ==== Adding rich rule ==== | ==== Adding rich rule ==== | ||
| Line 12: | Line 25: | ||
| source address=" | source address=" | ||
| port protocol=" | port protocol=" | ||
| + | </ | ||
| + | |||
| + | ==== Port redirection ==== | ||
| + | Using following command one can redirect port traffic to another. | ||
| + | <code bash> | ||
| + | # iptables -t nat -A PREROUTING -i eth2 -p tcp --dport 8080 -j REDIRECT --to-port 8443 | ||
| + | firewall-cmd --permanent --direct --add-rule ipv4 nat OUTPUT 0 -p tcp -o lo --dport 8080 -j REDIRECT --to-ports 8443 | ||
| </ | </ | ||
firewalld.1533734597.txt.gz · Last modified: 2020/08/10 02:30 (external edit)
                
                