Direct traffic through remote machine

Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.
How do I go about setting this up?
ssh ssh-tunneling port-forwarding
add a comment |Â
up vote
1
down vote
favorite
I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.
How do I go about setting this up?
ssh ssh-tunneling port-forwarding
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.
How do I go about setting this up?
ssh ssh-tunneling port-forwarding
I have Machine A, which has internet access and has Tor running on port 9150. I have Machine B, which can't access the internet but can access Machine A via SSH. I want to run a command on Machine B (no internet machine); this command on Machine B accesses the internet. I want this command to go through Machine A port 9150. I don't have sudo access on Machine B, but I have sudo access on machine A.
How do I go about setting this up?
ssh ssh-tunneling port-forwarding
asked Dec 25 '17 at 17:57
sanjeev mk
1061
1061
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
If Tor is listening on localhost only, use SSH local port forwarding from Machine B:
ssh user@machineA -L9150:localhost:9150
This will effectively bind port 9150 on Machine B to port 9150 on Machine A.
Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.
In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:
proxychains curl http://example.onion
Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
If Tor is listening on localhost only, use SSH local port forwarding from Machine B:
ssh user@machineA -L9150:localhost:9150
This will effectively bind port 9150 on Machine B to port 9150 on Machine A.
Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.
In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:
proxychains curl http://example.onion
Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.
add a comment |Â
up vote
0
down vote
If Tor is listening on localhost only, use SSH local port forwarding from Machine B:
ssh user@machineA -L9150:localhost:9150
This will effectively bind port 9150 on Machine B to port 9150 on Machine A.
Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.
In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:
proxychains curl http://example.onion
Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
If Tor is listening on localhost only, use SSH local port forwarding from Machine B:
ssh user@machineA -L9150:localhost:9150
This will effectively bind port 9150 on Machine B to port 9150 on Machine A.
Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.
In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:
proxychains curl http://example.onion
Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.
If Tor is listening on localhost only, use SSH local port forwarding from Machine B:
ssh user@machineA -L9150:localhost:9150
This will effectively bind port 9150 on Machine B to port 9150 on Machine A.
Or, if you can change the Tor daemon to listen on all interfaces on Machine A and no inbound firewall blocking this, you can ignore the SSH forwarding.
In either case, you can then use a tool such as proxychains, configured appropriately, to prepend your commands such that they go over Tor:
proxychains curl http://example.onion
Proxychains is likely available through your package manager, but a newer version exists on GitHub at https://github.com/rofl0r/proxychains-ng. The default configuration will try to connect to a Tor SOCKS server on localhost, but this can be changed by modifying proxychains.conf if necessary.
answered Dec 25 '17 at 18:08
multithr3at3d
37618
37618
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412994%2fdirect-traffic-through-remote-machine%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password