-
Notifications
You must be signed in to change notification settings - Fork 129
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
Bind to device #70
Comments
That's because mlvpn uses UDP: socket(7):
|
Is there some more context? Where’s the prediction? What exactly doesn’t work? I’ve also tried using ip rule add from 172.20.10.2 table 1
ip rule add from 10.0.0.218 table 2
ip route add 172.20.10.0/28 dev wlp4s0 scope link table 1
ip route add default via 172.20.10.1 dev wlp4s0 table 1
ip route add 10.0.0.0/24 dev enp0s25 scope link table 2
ip route add default via 10.0.0.1 dev enp0s25 table 2
ip route add default scope global nexthop via 10.0.0.1 dev enp0s25 (Where I haven’t understood yet why source-based routing is required. The symptom I’m seeing without source-based routing is that the mlvpn link never authenticates. While the response packets appear in tcpdump, the Linux kernel seems to not deliver the packet to mlvpn. Reverse-path filtering is off for all interfaces:
Any input appreciated. |
I've lost the context a little, and in the end, I think it was my own stupidity. Hence, for me, I can no longer even test binding to devices - but from what I can remember, it worked ok. (From my point of view, you can close this ticket). Cheers Mark |
The problem with UDP is that it's not a connected protocol. When mlvpn will try to send a packet outside, it will only tell the kernel the destination address, destination port and, enventually the bind address. bind address is used because the kernel needs to know how to send the packet. What source IP address should it use? By default, the kernel will lookup the destination address in the routing table, then if a source address is specified in the routing table, will choose this address (if bind address is not set) and send the packet. Said otherwise, if you have the following:
In that case, source routing is required because it's the only way to tell the kernel how to send a packet to the same destination two different ways. (By using the source routing system). If you have two ip addresses on the same server on the other side, everything is much simplified. All you have to do is set two entries in the routing table with "src" set to the correct addresses. Hope it clarifies a bit. |
Managed to solve the issue I had in #70 (comment): $ sudo iptables -nvL -t raw
Chain PREROUTING (policy ACCEPT 38644 packets, 67M bytes)
pkts bytes target prot opt in out source destination
1762 274K DROP all -- * * 0.0.0.0/0 0.0.0.0/0 rpfilter invert I wasn’t even aware there is a |
So, with the issue I’ve had being resolved, I’d be very interested to see the @zehome What needs to happen before the branch can get merged? |
I figured a ticket would help track this, I tried the bindztodev branch, and as you predicted, it doesn't work, for a number of reasons I haven't got to the bottom of it, but for a start, you need to run as root it seems which isn't ideal. Apart from that the branch works (but you need the same branch on both ends due to crypto).
Cheers
Mark.
The text was updated successfully, but these errors were encountered: