Use UCS as a gateway

Produktlogo UCS Version 4

Problem:

An UCS system with multiple NIC’s is planned/installed. The first NIC is connected to the internet and the clients should be connected to the second NIC. The UCS system should act as gateway or router.

By default this is not enabled.

Workaround:

You can simply achieve this goal by activating ipv4 forwarding and masquerading (masquerading will shadow the internal network from external access).

In this example we are using eth0 as the first NIC (which is connected to the internet) and eth1 as the second NIC (where the clients are connected and where “the internet” should be available).


 echo "net.ipv4.ip_forward = 1"  /etc/sysctl.d/ipv4forwarding.conf
sysctl -p /etc/sysctl.d/ipv4forwarding.conf
echo "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE"  /etc/security/packetfilter.d/50_local.sh
Mastodon