I have created centos stream 9, and i'm planning to make this linux box acting as router, this linux box has 2 nic, one connected to wan, the other one connected to lan, i did below steps, but the 2nd nic can not share internet to other client computers, any help would be appreicated
ens224 facing wan
ens192 facing lan
cat /etc/sysctl_d/ip_forward.conf
net.ipv4.ip_forward = 1
firewall-cmd --permanent --direct --passthrough ipv4 -t nat -I POSTROUTING -o ens224 -j MASQUERADE -s 192.168.1.0/24
firewall-cmd --change-interface=ens224 --zone=external --permanent
firewall-cmd --set-default-zone=internal
firewall-cmd --complete-reload
systemctl restart network && systemctl restart firewalld
- firewall-cmd --list-all --zone=external
external (active)
target: default
icmp-block-inversion: no
interfaces: ens224
sources:
services: ssh
ports:
protocols:
forward: yes
masquerade: yes
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@CentOSHome ~]# firewall-cmd --list-all --zone=internal
internal (active)
target: default
icmp-block-inversion: no
interfaces: ens192
sources:
services: cockpit dhcpv6-client mdns samba-client ssh
ports:
protocols:
forward: yes
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:
[root@CentOSHome ~]#