Configura la connettività di rete alle origini Amazon RDS per Oracle
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina descrive come configurare la connettività di rete alle origini Amazon RDS per Oracle per le migrazioni eterogenee da Oracle a Cloud SQL per PostgreSQL con Database Migration Service.
Esistono tre metodi diversi che puoi utilizzare per configurare la connettività di rete necessaria per le migrazioni dalle origini Amazon RDS for Oracle:
Configurare la connettività della lista consentita IP
Per utilizzare il metodo di connettività della lista consentita IP pubblici:
Nella console di gestione AWS, esegui i seguenti passaggi:
Assicurati che il database Amazon RDS di origine sia configurato per le connessioni IP pubbliche.
Identifica il nome dell'endpoint e il numero di porta. Devi inserire questi valori
quando crei il profilo di connessione.
Per saperne di più sulla preparazione dell'istanza Amazon RDS for Oracle, consulta la sezione
Connessione all'istanza DB Oracle nella documentazione di Amazon RDS.
Nella sezione Definisci i dettagli di connessione,
utilizza il nome dell'endpoint dell'istanza per l'IP del database di origine.
Nella sezione Definisci metodo di connettività, seleziona
Lista consentita IP.
Configura la connettività tramite un tunnel SSH di forwarding
Per connetterti al database di origine con un tunnel Secure Shell (SSH):
Avvia un'istanza Amazon EC2 da utilizzare come tunnel SSH di forwarding dedicato.
Assicurati di configurarlo nello stesso Amazon VPC in cui
si trova l'origine Amazon RDS per Oracle.
Crea un account utente separato e dedicato per Database Migration Service per
connettersi come:
adduserTUNNEL_ACCOUNT_USERNAME
Limita l'accesso alla shell per l'account di Database Migration Service per
aumentare la sicurezza:
usermod-s/usr/sbin/nologinTUNNEL_ACCOUNT_USERNAME
Decidi quale metodo di autenticazione vuoi che Database Migration Service utilizzi
quando si connette al tunnel.
Puoi utilizzare una password semplice o generare chiavi SSH nel formato
PEM che puoi caricare in Database Migration Service
quando crei il profilo di connessione di origine.
Se vuoi utilizzare una password, non devi configurare nulla
di aggiuntivo. Ricorda la password che hai creato per l'account
TUNNEL_ACCOUNT_USERNAME.
Se vuoi utilizzare l'autenticazione basata su chiave, devi generare
una coppia di chiavi pubblica-privata. Ad esempio, puoi utilizzare l'utilità
ssh-keygen:
Genera la coppia di chiavi:
ssh-keygen-mPEM-fYOUR_KEY_NAME
Copia la chiave pubblica (YOUR_KEY_NAME.pub)
nella directory ~/.ssh/ sul server tunnel.
Salva la chiave privata. Dovrai caricarlo in un secondo momento in Database Migration Service
quando crei il profilo di connessione di origine.
Modifica il file /etc/ssh/sshd_config per configurare il tunnel
SSH in modo che corrisponda ai requisiti della tua organizzazione.
Ti consigliamo di utilizzare le seguenti impostazioni:
# 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
Esegui il comando ssh per avviare il tunnel.
Prima di utilizzare i dati dei comandi riportati di seguito, effettua le seguenti sostituzioni:
TUNNEL_SERVER_SSH_PORT con il numero di porta
in cui il server è in attesa di connessioni SSH.
SOURCE_DATABASE_PRIVATE_IP con l'indirizzo IP privato
del database di origine. Il server SSH deve essere in grado di
raggiungere questo IP.
SOURCE_DATABASE_PORT con il numero di porta
in cui il database di origine è in attesa di connessioni. Il numero di porta
predefinito per le connessioni TCP su Oracle è 1433.
USERNAME con il nome dell'account utente che
eseguirà il tunnel. Si tratta di un account separato da
TUNNEL_ACCOUNT_USERNAME.
TUNNEL_SERVER_PUBLIC_IP con l'IP pubblico
del server del tunnel SSH.
Nella sezione Definisci i dettagli di connessione,
utilizza il nome dell'endpoint dell'istanza per l'IP del database di origine.
Nella sezione Definisci metodo di connettività,
seleziona Tunnel SSH di forwarding.
Fornisci l'indirizzo IP pubblico o il nome host del server SSH.
Specifica la porta che hai designato per le connessioni SSH sul server del tunnel.
Inserisci il nome utente dell'utente creato per Database Migration Service
per la connessione (ovvero il valore di TUNNEL_ACCOUNT_USERNAME).
Nel menu a discesa Metodo di autenticazione, seleziona
il metodo di autenticazione che vuoi utilizzare con TUNNEL_ACCOUNT_USERNAME:
Se vuoi utilizzare la password dell'utente, seleziona Password e
inserisci la password TUNNEL_ACCOUNT_USERNAME nel modulo.
Se hai configurato il server SSH per utilizzare l'autenticazione basata su chiavi,
seleziona Coppia di chiavi privata/pubblica e carica la chiave privata
che hai generato con il comando ssh-keygen.
Configura la connettività privata con il peering VPC
Per utilizzare la connettività privata con le origini Amazon RDS per Oracle, devi aver configurato Cloud VPN o Cloud Interconnect nella stessa rete VPC in cui intendi creare la configurazione di connettività privata per Database Migration Service. Se non riesci a creare la configurazione di connettività privata
nella rete VPC in cui hai Cloud VPN o Cloud Interconnect,
devi anche disporre di una macchina virtuale (VM) proxy inverso su Compute Engine per
stabilire la connessione.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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."]]