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?
Related
I have PostgreSQL 9.4 running on a Linux VPS, and I need to be able to connect to it over SSH from both Linux and Windows clients. (I will later need to connect to multiple servers, and so that all clients use the same port numbers, I'm forwarding to port 5551 for the first server, then I will use 5552, 5553, etc.)
From a Linux client I just run ssh -fNg -L 5551:localhost:5432 user#remote1.com and connect to localhost:5551 with PGAdmin3 or any other client app. Works great.
On Windows, I'm using PuTTY and Pageant. I got the connection to user#remote1.com via terminal working, then I went to the SSH Tunnels and added L5432 localhost:5551. Terminal connection still works, but when I try to connect with PGAdmin3 to localhost:5551 I get an error:
could not connect to server: Connection refused (0x0000274AD/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5551?
I resolved it. Like many things, this is obvious in hindsight. I had things backward in the SSH Tunnels setup in PuTTY. It needs to be L5551 remote1.com:5432
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.
Closed. This question does not meet Stack Overflow guidelines. 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 8 years ago.
Improve this question
I have a user who gets:
FATAL: no pg_hba.conf entry for host "2002:8c64:7831::8c64:7831" user
"", database "postgis", SSL Off
when trying to retrieve data from Postgres using QGIS 2.0. The user has had a new machine (running 32bit Windows 7). The rest of the estate are currently running XP, and no-one else ius reporting the issue. My pg_hba.conf has all as trusted:
host all all 127.0.0.1/32 trust
host all all 0.0.0.0/0 trust
host all all ::1/128 trust
host all all 0.0.0.0/0 trust
Do I need to make any changes to the pg_hba.conf file for a windows 7 client? or what changes do I need to make to get it working?
You are missing allow entries for ipv6, you only allow localhost over ipv6. You should add ::/0 (all addresses) or 2000::/3 (all routable addresses) as well.
Closed. This question does not meet Stack Overflow guidelines. 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 9 years ago.
Improve this question
I'm working on Django. I use PostgreSQL database.
Full error says:
could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
Do you have any idea?
Wild stab in the dark: You're on a machine with an IPv6 resolver where localhost defaults to the IPv6 address ::1, but listen_addresses in postgresql.conf is set to 127.0.0.1 or 0.0.0.0 not * or you're using an older PostgreSQL built with a C library that doesn't have transparent IPv6 support.
Change listen_addresses to localhost and make sure localhost resolves to both the IPv4 and IPv6 addresses, or set it to ::1, 127.0.0.1 to explicitly specify both IPv4 and IPv6. Or just set it to * to listen on all interfaces. Alternately, if you don't care about IPv6, connect to 127.0.0.1 instead of localhost.
See this Google search or this Stack Overflow search for more information.
(Posting despite my close-vote because I voted the question for migration).
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.