![]() ![]() To reiterate, the command above forward port 6033 on the local system to port 3306 on the remote system. Now let's setup our SSH Forwarding to allow use to connect to the MySQL database on the remote server through the SSH connection. ~]# service mysqld statusĬhain INPUT (policy ACCEPT 0 packets, 0 bytes) In this example, we are going to connect to the database through the SSH tunnel, so we do not need the port opened on the host system. This means that normal communication to the database is blocked by the firewall. You will see that we have MySQL running and listening on port 3306, BUT iptables (host firewall) DOES not have 3306 open. Here are some configuration parameters of the server. We will forward local port 6603 (putor:6603) to the remote port (centos6:3306) and make the database connection. Local Forwarding - Example 1įor this first example we will connect our local machine named putor to a legacy MySQL database server named centos6 to encrypt the traffic. The SSH client will listen for connections to the local port, when it receives that connection it forwards it to the remote system on the specified port. Local forwarding is used to send traffic destined for a local port to a port on a remote machine through the SSH tunnel.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |