Skip to content
This repository has been archived by the owner on Feb 24, 2019. It is now read-only.

Accessing a process through 127.0.0.1 #10

Open
joachimesque opened this issue Feb 13, 2018 · 2 comments
Open

Accessing a process through 127.0.0.1 #10

joachimesque opened this issue Feb 13, 2018 · 2 comments

Comments

@joachimesque
Copy link

Hey,

A couple months ago I came with a strange problem, but I solved it (I deleted my system and reinstalled everything)

I'd like to use Deluge with vpnshift. Deluge is a bittorrent client, with a daemon (deluged), and a web interface (deluge-web). I managed to get the daemon to connect to the internet through vpnshift, and it looks like it's working well.

Next step, is having the web client to connect to the daemon. Normally, it's connected through 127.0.0.1:some_port.

Except that… if I undersand it well… the daemon is in its own namespace due to vpnshift. How can I get the web client to connect to it ?

@joachimesque
Copy link
Author

After a few hours of reading the docs and the code, I can communicate through 10.10.10.11:port, all's well.

Now, I'm trying to have daemons use vpnshift. I manage by removing the clean exit calls at the end, but I'm sure there's a better way.

@crasm
Copy link
Owner

crasm commented Mar 23, 2018

Since vpnshift runs in the "vpnshift" network namespace, you can enter the namespace using ip.

sudo ip netns exec vpnshift <command, executed as root>

So you could do:

sudo ip netns exec vpnshift sudo -u crasm bash

Then start your daemons and exit the shell.

If you mean you want to start vpnshift in the background for a daemon, but then close the shell without killing openvpn, you might be better off with vpnns.sh since that gives you control over the stages rather than combining them all together.

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

No branches or pull requests

2 participants