Opened 8 years ago
Last modified 19 months ago
#756 new User question
Allow binding to --local interface
Reported by: | d3xt3r01 | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Generic / unclassified | Version: | OpenVPN 2.3.4 (Community Ed) |
Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | |
Cc: |
Description
My current setup is eth0 and an usb 3g dongle.
I want the 3g dongle to be connected to an openvpn server somewhere.
The problem is that I can't use --local ppp0 because it's not supported. I don't want to hardcode an ip, if the dongle's connection drops, new ip !
Also, the ppp connection doesn't need/have a gateway. I've even tried using --local <ip of ppp0> with no luck it seems for some reason ! ( this might actually be a bug ).
Can happily test any patches.
Change History (7)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Type: | Feature Wish → User question |
---|
comment:3 Changed 8 years ago by
while your exact goal cannot be achieved, maybe for now you could use the server as a client for your workaround. you can have it connect to another server and then you have your client connect to that server to reach the target machine (which is now another client).
comment:4 Changed 6 years ago by
@cron2 have you considered implementing something like this? (look up IP dynamically and bind there?)
Other tools allow to specify an interface instead of an IP, but the IP lookup is performed only once at startup (so would not solve this use case anyhow).
This has the advantage of allowing the user to launch openvpn using always the same command (with fixed interface) instead of looking up the (possibly dynamic) IP every time.
comment:5 follow-up: 6 Changed 19 months ago by
Does the new --bind-dev
directive do what OP was asking for?
comment:6 Changed 19 months ago by
Replying to luckman212:
Does the new
--local-dev
directive available in v2.6 do what OP was asking for?
there is no such option. not sure where you have seen it?
--local <ip of ppp0>
}should work (with the real adress put there, of course). If not, please show a log file.
--local ppp0
is something the socket API does not permit us to do.
What you should be able to do, though, is point the route towards your OpenVPN server out the ppp0 interface, and the system should totally automatically pick the correct source IP for that interface ("packets use the IP address of the outgoing interface, unless told otherwise") - so, no option manipulation should be needed at all.
(To the contrary: if you do not have this route, "just using the 3g address" won't magically send your packets out there)