Buscar este blog

domingo, 9 de junio de 2019

CentOS 7 - Port forwarding

I have three environments:
  1. Local, i.e, my PC
  2. Server 1, a remote CentOS 7 server
  3. Database Server, a remote Oracle Database server
Server 1 has access to Database Server.
Local has access to Server 1.
Local does not have access to Database Server.

By assuming Oracle Database is opened in port 1521 this is the configuration in Server 1 in order to redirect all requests in port 1521 to Database Server port 1521:
# sudo firewall-cmd --add-forward-port=port=1521:proto=tcp:toport=1521:toaddr=DatabaseServer

# sudo firewall-cmd --add-masquerade

# sudo firewall-cmd --zone=public --add-port=1521/tcp

# sudo firewall-cmd --list-all


No hay comentarios:

Publicar un comentario