Score:1

Forwarded connection refused by server: Connect failed [Connection timed out]

iq flag

I have an Ubuntu 20.4 LTS that running Squid as a proxy server.

I have a scenario that I'm forwarding traffic from another server to the Linux server using plink with the following command:

plink.exe -L 0.0.0.0:PORT:localhost:SQUID_PORT [email protected] -pw "pass" -N -v

Output:

Local port 0.0.0.0:PORT forwarding to localhost:SQUID_PORT

To test it, I'm using the following python code (After running the command above):

import requests

headers = {"user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36"}

proxies = {
  'http': 'http://Proxy_IP:PORT',
  'https': 'http://Proxy_IP:PORT',
}

proxies2 = {
  'http': 'http://localhost:1230',
  'https': 'http://localhost:1230',
}

res = requests.get(url='https://api.ipify.org/?format=json', proxies=proxies)
print(res.text)

I'm getting the following error:

Forwarded connection refused by the server: Connect failed [Connection timed out]

This issue isn't happening when I'm using the proxy IP instead of localhost (proxies2 in the python code)

What can be the cause of this issue? It's important to say that the same scenario is working on a different proxy server, so I'm sure that it's related to the Linux server configurations.

cocomac avatar
cn flag
What version of Ubuntu are you using? You tagged your question with 20.04, but wrote 20.5 LTS - AFAIK, that isn’t a Ubuntu version.
Ido Segal avatar
iq flag
Edited. Thanks for the attention.
Score:1
iq flag

I ran the following command and the issue has been resolved.

sudo iptables -P INPUT ACCEPT
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.