I have a RHEL 9 server which has IP addresses as 172.10.0.10
and 172.30.1.10
, which is connected to two separate switches with two separate network interfaces.
This server runs a virtual machine, which has IP address of 172.30.1.200
. We connected another physical network interface of this physical server to the switch connected to 172.30.1.XXX
block. This network interface is only reserved to that virtual machine, so that virtual machine can communicate with our other servers in 172.10.0.XXX
block.
In this point, I have to make this server as a specific gateway between our other servers and the virtual machine. This server should make itself as a gateway between 172.30.1.200
(the virtual machine), and few servers on the IP block of 172.10.0.XXX
block.
I have tried port forwarding, but this doesn't work for a specific reason about the application running on our VM.
This server, which is I'm planning to make the gateway, must work as a gateway only for those 2 separate IP blocks. Because it's open to world internet, I need to make this gateway minimal as possible. I've added needed IP address of clients and VM to internal
zone of firewalld
, any changes I'll made should only affect the internal zone, if possible.
Also, the clients in 172.10.0.XXX
also connect to the internet, with another gateway address. So the clients have to use 172.10.0.10
gateway to communicate for the address of 172.30.1.200
only, not with the entire internet network.