Configurar a conectividade de rede para as origens do Amazon RDS para Oracle
Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
Esta página descreve como configurar a conectividade de rede com fontes do Amazon RDS para Oracle para migrações heterogêneas do Oracle para o Cloud SQL para PostgreSQL com o Database Migration Service.
Há três métodos diferentes que podem ser usados para configurar a conectividade de rede necessária para migrações de fontes do Amazon RDS para Oracle:
Na seção Definir detalhes da conexão, use o nome do endpoint da instância para o IP do banco de dados de origem.
Na seção Definir método de conectividade, selecione
Lista de permissões de IP.
Configurar a conectividade por um túnel SSH com encaminhamento
Para se conectar ao banco de dados de origem com um túnel Secure Shell (SSH), siga estas etapas:
Inicie uma instância do Amazon EC2 para servir como um túnel SSH de encaminhamento dedicado.
Configure na mesma Amazon VPC em que você tem a origem do Amazon RDS para Oracle.
Crie uma conta de usuário separada e dedicada para que o Database Migration Service se conecte como:
adduserTUNNEL_ACCOUNT_USERNAME
Restrinja o acesso ao shell da conta do Database Migration Service para aumentar a segurança:
usermod-s/usr/sbin/nologinTUNNEL_ACCOUNT_USERNAME
Decida qual método de autenticação você quer que o Database Migration Service use
ao se conectar ao túnel.
Você pode usar uma senha simples ou gerar chaves SSH no formato
PEM, que podem ser enviadas para o Database Migration Service
ao criar o perfil de conexão de origem.
Se você quiser usar uma senha, não será necessário configurar nada
adicional. Lembre-se da senha que você criou para a
conta TUNNEL_ACCOUNT_USERNAME.
Se você quiser usar a autenticação baseada em chaves, gere um par de chaves pública e privada. Por exemplo, use o utilitário
ssh-keygen:
Gere o par de chaves:
ssh-keygen-mPEM-fYOUR_KEY_NAME
Copie a chave pública (YOUR_KEY_NAME.pub) para o diretório ~/.ssh/ no servidor de túnel.
Salve a chave privada. Você precisará fazer upload dele mais tarde no Database Migration Service
ao criar o perfil de conexão de origem.
Edite o arquivo /etc/ssh/sshd_config para configurar o túnel
de encaminhamento SSH de acordo com os requisitos da sua organização.
Recomendamos usar as seguintes configurações:
# Only allow the Database Migration Service user to connect.
AllowUsersTUNNEL_ACCOUNT_USERNAME# Send keep-alive packets every 60 seconds to ensure that# the tunnel doesn't close during the migrationServerAliveInterval=60# Optional: Force key-based authentication
PasswordAuthenticationno
# Enables Database Migration Service to connect from a different host
PermitTunnelyes
GatewayPortsyes
Execute o comando ssh para iniciar o túnel.
Antes de usar os dados do comando abaixo, faça estas substituições:
TUNNEL_SERVER_SSH_PORT com o número da porta
em que o servidor está escutando conexões SSH.
SOURCE_DATABASE_PRIVATE_IP pelo endereço IP particular do banco de dados de origem. O servidor SSH precisa conseguir
acessar esse IP.
SOURCE_DATABASE_PORT com o número da porta
em que o banco de dados de origem está detectando conexões. O número da porta padrão para conexões TCP no Oracle é 1433.
USERNAME com o nome da conta de usuário que
vai executar o túnel. Essa é uma conta separada de
TUNNEL_ACCOUNT_USERNAME.
TUNNEL_SERVER_PUBLIC_IP com o IP público do servidor de túnel SSH.
Na seção Definir detalhes da conexão, use o nome do endpoint da instância para o IP do banco de dados de origem.
Na seção Definir método de conectividade, selecione Túnel SSH de encaminhamento.
Forneça o endereço IP público ou o nome do host do seu servidor SSH.
Forneça a porta designada para as conexões SSH no
servidor de túnel.
Insira o nome de usuário criado para o Database Migration Service
se conectar (ou seja, o valor de TUNNEL_ACCOUNT_USERNAME).
No menu suspenso Método de autenticação, selecione
o método que você quer usar com o TUNNEL_ACCOUNT_USERNAME:
Se quiser usar a senha do usuário, selecione Senha e
digite a senha TUNNEL_ACCOUNT_USERNAME no formulário.
Se você configurou o servidor SSH para usar a autenticação baseada em chaves,
selecione Par de chaves privada/pública e faça upload da chave privada
gerada com o comando ssh-keygen.
Configurar a conectividade privada com o peering de VPC
Para usar a conectividade particular com fontes do Amazon RDS para Oracle,
é necessário ter uma Cloud VPN ou um Cloud Interconnect configurado na mesma
rede VPC em que você pretende criar a configuração de conectividade particular
para o Database Migration Service. Se não for possível criar a configuração de conectividade particular
na rede VPC em que você tem o Cloud VPN ou o Cloud Interconnect,
também será necessário uma máquina virtual (VM) de proxy reverso no Compute Engine para
estabelecer a conexão.
Opcional: se não for possível criar a configuração de conectividade particular na mesma rede VPC em que você tem a Cloud VPN, crie uma
máquina virtual (VM) de proxy reverso no Compute Engine para encaminhar as conexões entre as VPCs.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-09-01 UTC."],[],[],null,["# Configure network connectivity to Amazon RDS for Oracle sources\n\nThis page describes how to configure network connectivity to Amazon RDS for\nOracle sources for heterogeneous Oracle to\nCloud SQL for PostgreSQL migrations with Database Migration Service.\n\nThere are three different methods you can use to configure the necessary\nnetwork connectivity for migrations from Amazon RDS for Oracle\nsources:\n\n- [Public IP allowlist](#ip-allowlist#)\n- [Forward-SSH tunnel](#forward-ssh)\n- Requires Cloud VPN or Cloud Interconnect: [Private IP connectivity with Virtual Private Cloud peering](#private-vpc-peering)\n\nTo learn more about source database network connectivity, see\n[Source networking methods overview](/database-migration/docs/oracle-to-postgresql/networking-methods-source).\n\nConfigure IP allowlist connectivity\n-----------------------------------\n\nTo use the public IP allowlist connectivity method, follow these steps:\n\n1. In the AWS Management Console, perform the following steps:\n 1. Ensure that your source Amazon RDS database is configured for public IP connections.\n 2. Identify the endpoint name and port number. You need to enter these values when you create the connection profile.\n\n For more information about preparing your Amazon RDS for Oracle\n instance, see\n [Connecting to your Oracle DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToOracleInstance.html) in the Amazon RDS\n documentation.\n2. Create a security group that allows traffic from Database Migration Service\n to your Amazon RDS VPC. See\n [Provide access to your DB instance in your VPC by creating a security group](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_SettingUp.html#CHAP_SettingUp.SecurityGroup).\n\n Make sure you allow all [Database Migration Service public IP addresses](/database-migration/docs/oracle-to-postgresql/ip-allowlists-and-regions) for the region where you\n create the migration job.\n3. At a later stage, when you [create the source connection profile](/database-migration/docs/oracle-to-postgresql/create-source-connection-profile), do the following:\n 1. In the **Define connection details** section, use your instance's endpoint name for the source database IP.\n 2. In the **Define connectivity method** section, select **IP allowlist**.\n\nConfigure connectivity over a forward-SSH tunnel\n------------------------------------------------\n\nTo connect to your source database with a Secure Shell (SSH) tunnel,\nfollow these steps:\n\n1. Launch an Amazon EC2 instance to serve as a dedicated forward-SSH tunnel.\n Make sure you configure it in the same Amazon VPC where you\n have your source Amazon RDS for Oracle.\n\n For more information, see\n [Get started with Amazon EC2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html) in the Amazon documentation.\n2. [Connect to your EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EC2_GetStarted.html#ec2-connect-to-instance) and set up the SSH tunnel. Follow these steps:\n 1. Create a separate, dedicated user account for Database Migration Service to connect as: \n\n ```bash\n adduser TUNNEL_ACCOUNT_USERNAME\n ```\n 2. Restrict shell access for the Database Migration Service account to enhance security: \n\n ```bash\n usermod -s /usr/sbin/nologin TUNNEL_ACCOUNT_USERNAME\n ```\n 3. Decide what authentication method you want Database Migration Service to use\n when connecting to the tunnel.\n\n You can use a simple password, or generate SSH keys in the\n `PEM` format that you can later upload to Database Migration Service\n when you create the source connection profile.\n - If you want to use a password, you don't need to configure anything additional. Remember what password you created for the \u003cvar translate=\"no\"\u003eTUNNEL_ACCOUNT_USERNAME\u003c/var\u003e account.\n - If you want to use key-based authentication, you need to generate a private-public key pair. For example, you can use the `ssh-keygen` utility:\n 1. Generate the key pair: \n\n ```bash\n ssh-keygen -m PEM -f YOUR_KEY_NAME\n \n ```\n 2. Copy the public key (\u003cvar translate=\"no\"\u003eYOUR_KEY_NAME\u003c/var\u003e`.pub`) to the `~/.ssh/` directory on your tunnel server.\n 3. Save the private key. You need to upload it later to Database Migration Service when you create the source connection profile.\n 4. Edit the `/etc/ssh/sshd_config` file to configure the forward-SSH tunnel to match your organization's requirements. We recommend using the following settings: \n\n ```bash\n # Only allow the Database Migration Service user to connect.\n AllowUsers TUNNEL_ACCOUNT_USERNAME\n\n # Send keep-alive packets every 60 seconds to ensure that\n # the tunnel doesn't close during the migration\n ServerAliveInterval=60\n\n # Optional: Force key-based authentication\n PasswordAuthentication no\n\n # Enables Database Migration Service to connect from a different host\n PermitTunnel yes\n GatewayPorts yes\n ```\n 5. Run the `ssh` command to start the tunnel.\n\n Before using any of the command data below, make the following replacements:\n - \u003cvar class=\"edit\" scope=\"TUNNEL_SERVER_SSH_PORT\" translate=\"no\"\u003eTUNNEL_SERVER_SSH_PORT\u003c/var\u003e with the port number where your server is listening for SSH connections.\n - \u003cvar class=\"edit\" scope=\"SOURCE_DATABASE_PRIVATE_IP\" translate=\"no\"\u003eSOURCE_DATABASE_PRIVATE_IP\u003c/var\u003e with the private IP address of your source database. The SSH server needs to be able to reach that IP.\n - \u003cvar class=\"edit\" scope=\"SOURCE_DATABASE_PORT\" translate=\"no\"\u003eSOURCE_DATABASE_PORT\u003c/var\u003e with the port number where your source database is listening for connections. The default port number for TCP connections on Oracle is `1433`.\n - \u003cvar class=\"edit\" scope=\"USERNAME\" translate=\"no\"\u003eUSERNAME\u003c/var\u003e with the name of the user account that will be running the tunnel. This is a separate account from \u003cvar translate=\"no\"\u003eTUNNEL_ACCOUNT_USERNAME\u003c/var\u003e.\n - \u003cvar class=\"edit\" scope=\"TUNNEL_SERVER_PUBLIC_IP\" translate=\"no\"\u003eTUNNEL_SERVER_PUBLIC_IP\u003c/var\u003e with the public IP of your SSH tunnel server.\n\n ```bash\n ssh -N -L \\\n TUNNEL_SERVER_SSH_PORT:SOURCE_DATABASE_PRIVATE_IP:SOURCE_DATABASE_PORT \\\n USERNAME@TUNNEL_SERVER_PUBLIC_IP\n ```\n3. At a later stage, when you [create the source connection profile](/database-migration/docs/oracle-to-postgresql/create-source-connection-profile), do the following:\n 1. In the **Define connection details** section, use your instance's endpoint name for the source database IP.\n 2. In the **Define connectivity method** section, select **Forward-SSH tunnel**.\n 3. Provide the public IP address or hostname of your SSH server.\n 4. Provide the port that you designated for the SSH connections on the tunnel server.\n 5. Enter the username for the user you created for Database Migration Service to connect as (that is, the value of \u003cvar translate=\"no\"\u003eTUNNEL_ACCOUNT_USERNAME\u003c/var\u003e).\n 6. From the **Authentication method** drop-down menu, select the authentication method you want to use with \u003cvar translate=\"no\"\u003eTUNNEL_ACCOUNT_USERNAME\u003c/var\u003e:\n - If you want to use the user password, select **Password** and enter \u003cvar translate=\"no\"\u003eTUNNEL_ACCOUNT_USERNAME\u003c/var\u003e password in the form.\n - If you configured your SSH server to use key-based authentication, select **Private/Public key pair** and upload the **private key** [you generated in with the `ssh-keygen` command](#generate-ssh-keys-step).\n\nConfigure private connectivity with VPC peering\n-----------------------------------------------\n\nTo use private connectivity with Amazon RDS for Oracle sources,\nyou need to have a Cloud VPN or Cloud Interconnect configured in the same\nVPC network where you intend to create the private connectivity configuration\nfor Database Migration Service. If you can't create the private connectivity configuration\nin the VPC network where you have your Cloud VPN or Cloud Interconnect,\nthen you also need a reverse proxy Virtual Machine (VM) on Compute Engine to\nestablish the connection.\n\nIf you can't use Cloud VPN or Cloud Interconnect, we recommend\nthat you use the\n[forward-SSH tunnel](#forward-ssh-tunnel) or the\n[IP allowlist](#ip-allowlist)\nconnectivity methods instead.\n\nTo use private connectivity with VPC peering and Cloud VPN,\nfollow these steps:\n\n1. Set up direct connectivity with Cloud VPN to your Amazon RDS for\n PostgreSQL instance.\n\n For more information, see\n [Create HA VPN connections between Google Cloud and AWS](/network-connectivity/docs/vpn/tutorials/create-ha-vpn-connections-google-cloud-aws)\n in the Cloud VPN documentation.\n2. Optional: If you can't create the private connectivity configuration in the same VPC network where you have the Cloud VPN, create [a reverse proxy Virtual Machine (VM) on Compute Engine](/database-migration/docs/oracle-to-postgresql/configure-src-connection-reverse-proxy) to forward the connections between VPCs.\n3. In Database Migration Service, [create a private connectivity configuration](/database-migration/docs/oracle-to-postgresql/create-private-connectivity-configuration) to peer with the VPC network where you have your Cloud VPN.\n4. At a later stage, when you [create the source connection profile](/database-migration/docs/oracle-to-postgresql/create-source-connection-profile), do the following:\n 1. In the **Define connection details** section, enter the private IP of your source Amazon RDS instance.\n 2. In the **Define connectivity method** section, select **Private connectivity (VPC peering)**.\n 3. From the drop-down menu, select the private connectivity configuration you created in the previous step."]]