Estou usando redsocks para redirecionar através de um proxy. O problema é que quando uso uma ferramenta como o wget ela parece estar conectando, mas não resolvendo. Qual poderia ser o problema e como eu poderia resolvê-lo?
Executando wget google.com
--2020-08-22 17:32:34-- http://google.com/
Resolving google.com (google.com)... 172.217.1.110, 2607:f8b0:4008:810::200e
Connecting to google.com (google.com)|172.217.1.110|:80... connected.
HTTP request sent, awaiting response...
Executando curl google.com
curl -v google.com -o salvo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 172.217.1.110:80...
* Connected to google.com (172.217.1.110) port 80 (#0)
> GET / HTTP/1.1
> Host: google.com
> User-Agent: curl/7.71.1
> Accept: */*
>
0 0 0 0 0 0 0 0 --:--:-- 0:00:14 --:--:-- 0^C
redsocks.conf
base {
log_debug = on;
log_info = on;
log = "file:/var/log/redsocks.log";
daemon = on;
redirector = iptables;
}
redsocks {
local_ip = 0.0.0.0;
local_port = 12345;
ip = my.proxy;
port = 3128;
type = http-connect;
login = "myUser";
password = "myPassword";
}
redsocks {
local_ip = 0.0.0.0;
local_port = 12346;
ip = my.proxy;
port = 3128;
type = http-relay;
login = "myUser";
password = "myPassword";
}
tabelas de ip
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
REDSOCKS tcp -- 0.0.0.0/0 0.0.0.0/0
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain REDSOCKS (1 references)
target prot opt source destination
RETURN all -- 0.0.0.0/0 0.0.0.0/8
RETURN all -- 0.0.0.0/0 10.0.0.0/8
RETURN all -- 0.0.0.0/0 100.64.0.0/10
RETURN all -- 0.0.0.0/0 127.0.0.0/8
RETURN all -- 0.0.0.0/0 169.254.0.0/16
RETURN all -- 0.0.0.0/0 172.16.0.0/12
RETURN all -- 0.0.0.0/0 192.168.0.0/16
RETURN all -- 0.0.0.0/0 198.18.0.0/15
RETURN all -- 0.0.0.0/0 224.0.0.0/4
RETURN all -- 0.0.0.0/0 240.0.0.0/4
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 redir ports 12346
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 redir ports 12345
REDIRECT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:11371 redir ports 12346
Responder1
Substituí os redsocks por transocks e agora posso usar uma configuração para redirecionamento "http" e "https" (na minha tabela de IP eu redireciono todo o tráfego para os transocks)