<div dir="auto">Is it possible to use different port numbers for UDP and TCP? I'd like to open the TCP connection to one port on the remote server and stream the UDP packets to a different port. I've tried specifying both as BindToAddress and Address lines but it always just uses TCP.</div><div class="gmail_extra"><br><div class="gmail_quote">On 2 May 2017 17:36, "Guus Sliepen" <<a href="mailto:guus@tinc-vpn.org">guus@tinc-vpn.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, May 02, 2017 at 09:53:15PM +0800, Bright Zhao wrote:<br>
<br>
> When tinc daemon get up on A(together with some manual scripts for destination to 8.8.8.8), the route table looks like below:<br>
> <a href="http://10.0.0.0/24" rel="noreferrer" target="_blank">10.0.0.0/24</a> dev tun0<br>
> 10.0.0.3 dev tun0<br>
> 8.8.8.8 via 10.0.0.3 dev tun0<br>
<br>
IPv4 packets have only two addresses in their header: the source and the<br>
destination address. If you want to send a packet to 8.8.8.8, the<br>
destination address of the packet will always be 8.8.8.8, regardless of<br>
how it is forwarded via the network.<br>
<br>
Imagine that your local node would replace the destination address with<br>
10.0.0.3, then the information about the final destination (8.8.8.8)<br>
would be lost.<br>
<br>
The "via 10.0.0.3" only has an effect on Ethernet networks. Ethernet<br>
doesn't know about IPv4 or IPv6, it only knows about MAC addresses. What<br>
"via 10.0.0.3" does is that when it has to send a packet to 8.8.8.8, it<br>
sets the IPv4 header's destination address to 8.8.8.8, but it sets the<br>
Ethernet header's destination address to the MAC address of the host<br>
which has the address 10.0.0.3. It figured out the last part by doing<br>
ARP resolution.<br>
<br>
It's perhaps a bit confusing that there is no error message when you try<br>
to add such a route, even though the "via 10.0.0.3" part doesn't do<br>
anything. It's just ignored for non-Ethernet networks. Also, on some<br>
(older) BSD platforms, you could not add a route to a "dev tun0", you<br>
could only identify interfaces by their IP address. So there the<br>
equivalent of "via" would have an effect, but also not the one you<br>
intended.<br>
<font color="#888888"><br>
--<br>
Met vriendelijke groet / with kind regards,<br>
     Guus Sliepen <<a href="mailto:guus@tinc-vpn.org">guus@tinc-vpn.org</a>><br>
</font><br>______________________________<wbr>_________________<br>
tinc mailing list<br>
<a href="mailto:tinc@tinc-vpn.org">tinc@tinc-vpn.org</a><br>
<a href="https://www.tinc-vpn.org/cgi-bin/mailman/listinfo/tinc" rel="noreferrer" target="_blank">https://www.tinc-vpn.org/cgi-<wbr>bin/mailman/listinfo/tinc</a><br>
<br></blockquote></div><br></div>