Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues with localnet #12

Closed
shtonut opened this issue Feb 7, 2013 · 11 comments
Closed

issues with localnet #12

shtonut opened this issue Feb 7, 2013 · 11 comments

Comments

@shtonut
Copy link

shtonut commented Feb 7, 2013

I have compiled rofl0 proxychains 4.4 for linux on an ARM processor.

First it would get stuck during the hb_fill() call, so I basically commented out the contents (much like is done for BSD). Subsequently the application runs seemingly correctly, however, even with localhost allowed as a localnet in my configuration file, I cannot access that application (transmission) on the same host.

Transmission has both a web interface and a local interface accessed via RPC. Neither work, both hang until a long timeout occurs. This leads me to believe that proxychains is not sending responses back to localhost.

Can someone provide some debugging tips such that I can try to offer the maintainers more details that might track down the problem? I turned on DEBUG, but I quickly lose the output as the program backgrounds as a daemon and all output disappears.

Thanks.

@rofl0r
Copy link
Owner

rofl0r commented Feb 7, 2013

does other stuff such as telnet, wget, netcat work correctly ?
btw use a git checkout instead of 4.4, so we can be sure that this issue wasn't already fixed in the meantime.

@shtonut
Copy link
Author

shtonut commented Feb 7, 2013

I just tried a simple python client and server and they seem to work okay. so, something is special about transmission.

@shtonut
Copy link
Author

shtonut commented Feb 7, 2013

I ran transmission in the foreground with proxychains in DEBUG mode. I don't see any mention of connections to or from localhost/127.0.0.1 when I attempt to connect to it's web interface. I'm wondering if transmission is even receiving my connection requests. netstat shows that it is listening on the ports on all interfaces. Here is a snippet of the output with ip addresses X'ed out (there may be some extra debug print statements I added when debugging the hb_fill() issue):

DEBUG:pid[17932]:chain_step
... xx.xx.xx.xx:13049 DEBUG:pid[17932]:tunnel_to
DEBUG:host dns
<--socket error or timeout!
DEBUG:pid[17932]:pc_getnameinfo
DEBUG:pid[17932]:connect
DEBUG:target: xx.xx.xx.xx
DEBUG:port: 52632
DEBUG:pid[17932]:connect_proxy_chain
[proxychains] Strict chain ... xx.xx.xx.xx:1080 DEBUG:pid[17932]:timed_connect
DEBUG:
connect ret=-1
DEBUG:
poll ret=1
DEBUG:
value=0
DEBUG:pid[17932]:chain_step
... xx.xx.xx.xx:52632 DEBUG:pid[17932]:tunnel_to
DEBUG:host dns
<--socket error or timeout!
DEBUG:pid[17932]:connect
DEBUG:target: xx.xx.xx.xx
DEBUG:port: 44789
DEBUG:pid[17932]:connect_proxy_chain
[proxychains] Strict chain ... xx.xx.xx.xx:1080 DEBUG:pid[17932]:timed_connect
DEBUG:
connect ret=-1
DEBUG:
poll ret=1
DEBUG:
value=0

@rofl0r
Copy link
Owner

rofl0r commented Feb 7, 2013

i just tried proxychains 4.4 on an ARM machine using both glibc and musl libc, no problem at all with hdb_fill locking up. can you provide versions of glibc you are using ?

@rofl0r
Copy link
Owner

rofl0r commented Feb 7, 2013

you are aware that server programs do not work at all with proxychains ? how do you expect a connection that is made from someone else to go through a proxy.
you can only proxify outgoing TCP connections

@shtonut
Copy link
Author

shtonut commented Feb 7, 2013

understood. but the web interface for transmission is only available on the local network, and I don't want any incoming connections to it from the proxy. thus having local connections bypassed in the localnet setting.

I'm using libuClibc-0.9.28.so

@rofl0r
Copy link
Owner

rofl0r commented Feb 7, 2013

so, let me try to understand the issue
transmission is hooked via proxychains.
so its outgoing connections should go through a proxy, except its outgoing connections to 127.x.x.x, because you set that as a localnet.
its server sockets, which are not hooked should work as usual.
you are connecting to its server socket with an application that is not proxified, but the connection to 127.0.0.1 fails.
is that correct ?

btw, whats your setting here ? https://github.com/rofl0r/proxychains/blob/master/src/proxychains.conf#L51

@shtonut
Copy link
Author

shtonut commented Feb 7, 2013

yes, transmission is run via proxychains, outgoing connections not destined for 127.0.0.1 are to go through the proxy.

the servers sockets should work per normal, but apparently aren't. As i said, I verified with a simply python server script that proxychains is not hindering server sockets or local connections, so it's something that transmission is doing.

i am simply using a browser (or wget/curl) to access the server sockets without proxychains.

the setting for remote_dns_subnet is 224.

@rofl0r
Copy link
Owner

rofl0r commented Feb 9, 2013

how do you start transmission ? please provide the used command line (including configuration needed to get the web interface up) so i can do some tests.

@shtonut
Copy link
Author

shtonut commented Feb 11, 2013

i tested on ubuntu as well and received the same result. you'll need to install transmission-daemon and transmission-cli.

to run it put the settings.json file in /tmp:

proxychains4 transmission-daemon -f -g /tmp/.transmission-daemon -e /tmp/transmission-daemon.log --log-error --log-info --log-debug

Then go to the web interface at http://127.0.0.1:9091 or using the remote interface "transmission-remote -l"

Here is what my settings.json file looks like:

{
"alt-speed-down": 250,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 10,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
"blocklist-enabled": true,
"blocklist-url": "http://www.example.com/blocklist",
"cache-size-mb": 2,
"dht-enabled": true,
"download-dir": "/tmp",
"download-queue-enabled": true,
"download-queue-size": 5,
"encryption": 1,
"idle-seeding-limit": 30,
"idle-seeding-limit-enabled": false,
"incomplete-dir": "/tmp",
"incomplete-dir-enabled": true,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"message-level": 3,
"open-file-limit": 32,
"peer-congestion-algorithm": "",
"peer-limit-global": 240,
"peer-limit-per-torrent": 60,
"peer-port": 51413,
"peer-port-random-high": 65535,
"peer-port-random-low": 49152,
"peer-port-random-on-start": false,
"peer-socket-tos": "default",
"pex-enabled": true,
"port-forwarding-enabled": true,
"preallocation": 1,
"prefetch-enabled": 0,
"proxy": "",
"proxy-auth-enabled": false,
"proxy-auth-password": "",
"proxy-auth-username": "",
"proxy-enabled": false,
"proxy-port": 80,
"proxy-type": 0,
"queue-stalled-enabled": true,
"queue-stalled-minutes": 30,
"ratio-limit": 0.5000,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": false,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "{7cf65081446872c4b3e833340d1c19354c0d1fe6rcio8gJc",
"rpc-port": 9091,
"rpc-url": "/transmission/",
"rpc-username": "",
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false,
"scrape-paused-torrents-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"seed-queue-enabled": false,
"seed-queue-size": 10,
"speed-limit-down": 750,
"speed-limit-down-enabled": true,
"speed-limit-up": 50,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 18,
"upload-slots-per-torrent": 10,
"utp-enabled": false
}

@rofl0r
Copy link
Owner

rofl0r commented Nov 21, 2014

should be fixed via 4fb7eb0 (fix for #42 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants