Open Port 3306 via SSH [closed] - command-line

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to access a Remote MySQL database from a GoDaddy VPS. I have enabled remote access on my server but I need to open the 3306 port on GoDaddy's VPS. I was told by their suppor I would need to do this via SSH but they were not able to help me any further than that. I have successfully connected to my server via SSH. I have run the following command:
telnet myserver.com 3306
When I rund that command I get the following message, SHost is not allowed to connect to this MySQL serverConnection closed by foreign host.
How do I open the port to allow me to connect to a Remote MySQL database?

Use port forwarding.
ssh -L 3306:localhost:3306 myserver.com
(I assume you normally ssh to your server by running ssh myserver.com.)
Then, while that connection is active, connect to the database on localhost instead of myserver.com (e.g. test using telnet localhost 3306).
More details in the ssh manual.

Related

Configure Apache Age with pgAdmin [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 days ago.
This post was edited and submitted for review 2 days ago and failed to reopen the post:
Needs more focus Update the question so it focuses on one problem only by editing this post.
Improve this question
I've been looking for ways to configure apache-age with pgAdmin for easier interaction between PostgreSQL and Apache age on Windows.
I could not find anything related to set up with pgAdmin in the docs.
https://age.apache.org/age-manual/master/intro/setup.html
Can someone please guide me on how to set up apache age with pgAdmin?
You actually just need to connect the running postgres server instance with pgadmin.
Start the server bin/pg_ctl -D /data start
Open pgadmin and connect to the server by giving some details about the runing instance.
Go to pgadmin->servers(right-click)->register->server. Give the server details.
port: 5432 (default)
hostname/address:"localhost"
username: postgres
password: postgres
Here is Youtube Link for Installation in Windows. First, try to install Postgres and Apache AGE using this video tutorial.
To connect to Apache-age using pgAdmin, open pgAdmin and create a new server connection. In the New Server Registration dialog, enter the following information:
Name: A name for the connection.
Host: The hostname or IP address of the machine running Apache-age.
Port: The port number configured in the apache-age.conf file.
Database: the name of the database that you want to connect to. This should be a PostgreSQL database that you wish to use with Apache-age.
Click Save to establish the connection after entering this data. Now, you should be able to use pgAdmin to communicate with PostgreSQL via Apache-age.

using putty and socat to run rust server behind firewalls [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 days ago.
Improve this question
i want to run a rust server on a windows behind some routers and firewalls.
the idea: rust server on windows behind firewalls <- putty tunnel -> linux with no firewalls <-> rust client somewhere on a PC
the rust server runs on port 28015. all works fine locally "client.connect localhost 28015"
there is tcp port 28016 for rcon, and i think some magic on udp 28015 - i'm not sure if that is really needed.
with putty i have created a tunnels from windows to the remote linux machine: R28015 127.0.0.1:28015, R28016 127.0.0.1:28016
i can test it using telnet localhost 28015 and telnet localhost 28016. i do NET get connection refused, so i think the tunnel works. i changed the settings in SSHD config, so that even telent linuxhostname 28015 works.
sadly, it is not possible to connect with the rust client "client.connect linuxhostname 28015". i get timeout.
maybe rust needs the UDP as well.
so i set up another putty tunnel: R50053 127.0.0.1:50053 and used socat to
a) on windows map udp 28015 to tcp 50053 locally
command: socat udp-listen:28015,reuseaddr,bind=127.0.0.1,fork tcp:127.0.0.1:50053
b) on linux map tcp 50053 to udp 28015
command: socat tcp4-listen:50053,reuseaddr,fork,bind=127.0.0.1 UDP:127.0.0.1:28015
at least that was the plan. after some testing, i still get an error message on linux side:
socat[954671] E bind(5, {AF=2 127.0.0.1:50053}, 16): Address already in use
what's wrong. the whole idea or just the use of socat?

Can my web host prevent me from connecting to an external database? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 9 years ago.
Improve this question
I have two servers:
CP server - A website is hosted on a server running cpanel (I only have access to cpanel)
VPS server - A server running ubuntu and postgresql
I am pretty sure I did everything correct when I enabled remote access to the postgres database on the VPS server (I connected successfully from two other machines, on two different IPs). However, when I am running exactly the same PHP-code on the CP server, it fails to connect. I tried using fsockopen on this server. It does not work when I try to connect to the VPS server on port 5432, but works on port 80. On the other machines I tried on, it works on port 5432.
So, is it possible that my web hosting provider (the CP server) is blocking this connection somehow?
The webhosting provider is having firewall installed and its blocking the outgoing connection to the postgresql server.

Can't connect to another PC on the same network on a particular port [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to access the postgresql service which is running on my computer (which as you can see in the picture, it is running), from another computer on the same network.
On another computer, I am trying to access port 5432 (on which this service runs) by typing in telnet 192.168.2.102 5432; however it fails to connect. Can someone tell me what the problem might be please?
Read this and this pages of the manual to set up connections to the postgresql server correctly.
Take a closer look at listen_addresses, port configuration in postgresql.conf and security settings in pg_hba.conf.
And dont forget to restart your server after you've updated the config files.

Remote connection to PostgreSQL [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have just installed Postgresql 9.1 on windows server 2008. I was trying to connect it from the remote computer on the default port 5432(as I have not changed it), but was not successful. So what are the possible configuration settings changes to made?
You need to update some configuration files. They will be in a sub directory of your postgresql install in the data directory. On Windows most likely C:\Program Files\PostgreSQL\9.1\data
You need to update your postgres.conf file to listen_addresses = '*' so the postgres service can be seen by other machines. See 18.3. Connections and Authentication.
To let any machine connect to postgres pg_hba.conf. The 0.0.0.0/0 says let any ip address connect. You can trim this down so it's only ip ranges on your network. See 19.1. The pg_hba.conf File.
all all 0.0.0.0/0 md5
You should check your Postgresql Configuration file.
Verify the setting for listen_addresses. By default it likely only listens on your loopback address which would not allow you to connect from another machine. The simplest way to get it listening on an external interface is to set it to: listen_addresses = '*'
More info can be found in the documentation here.