Good afternoon, dear community members. Proxychains-ng.

Alex1986

New Member
Joined
Feb 29, 2024
Messages
2
Reaction score
0
Credits
22
Good afternoon, dear community members.
I am a novice Linux user. I have very little experience. I have such a task. There is a machine on which centos 7 is installed. This is the main machine on which I run my script. This script should work over certain ip addresses. I have 10 ssh accesses to the machines. I want to raise socks5 on these accesses

127.0.0.1:10001
...
127.0.0.1:10010
10 and connect the received socks to Proxychains-ng. My script will run through Proxychains-ng and should work in turn with these socks. I also need to check whether ssh access is working and whether the ip is really changing to the one I need through Proxychains-ng.
 


Moving this to Red Hat and Derivatives

This sounds like coursework or work-related, Alex.

You may not get a lot of assistance from people here, if the problem is something you could get an answer from your course tutor or work sysadmin.

Chris Turner
wizardfromoz
 
It's very sad, but I haven't been a student for a long time. And I don't have a system administrator at work. And there is no job either. I'm a freelancer. And I wanted to do this task for my personal project. We can say that this is a job. But I'm not getting paid for it.
 
Thanks, Alex.

Good luck.

Wizard
 
I have never used proxychains but just looked at the configuration file(/etc/proxychains.conf) and done some good old fashioned Googling, they have an example listed of how to setup the proxy list. However you would probably first have to setup a socks5 proxy that's run locally on the system you are configuring proxychains. You can do that like this, all you would have to do is run this from your centos system the system where you have proxychains installed.
Code:
ssh -N -D 10001 [email protected]
ssh -N -D 10010 [email protected]
And replacing the the example ip addresses with the ones from an actual system that you want to connect from and use in proxychains.

Then once that is done you can setup proxychains to use those socks proxies in the proxychains configuration file: /etc/proxychains.conf. At the bottom you can do that and comment out the default one, so that would look like this.
Code:
[ProxyList]
socks5  127.0.0.1   10001
socks5  127.0.0.1   10010
Finally you can test that you are connecting from the correct ip by running something like this, you could use that in you script to test the connection source address.
Code:
proxychains4 curl https://api.myip.com
Then either of those ports should be used to proxy your traffic using the command proxychains4. I haven't tested this but only looked at the configuration file and how someone else used proxychains(easy Google search?). That's all all the time I'm willing to spend on that, you should be able figure out the rest yourself.
 
Last edited:

Members online


Top