<div dir="ltr">You can add capability of raw socket to the executable, hence run as non-root.<div><br></div><div>Since what you're asking means potentially send illegal (unrouteable) IP packets, I guess that indeed the kernel will require special privileges to enable you to do that.</div>
<div><br></div><div>As I said, you can mitigate that with capabilities, or use the old method of start as root, bind socket and drop privileges, or use a small server creating such sockets running as root.</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 11:16 AM, Erez D <span dir="ltr"><<a href="mailto:erez0001@gmail.com" target="_blank">erez0001@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 11:05 AM, Elazar Leibovich <span dir="ltr"><<a href="mailto:elazarl@gmail.com" target="_blank">elazarl@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">use the SO_BINDTODEVICE setsockopt.<br></div></blockquote><div>requires me to be root ... <br></div><div>
<div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div>On Tue, Mar 4, 2014 at 10:02 AM, Erez D <span dir="ltr"><<a href="mailto:erez0001@gmail.com" target="_blank">erez0001@gmail.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div>Hello<br><br><br></div>I have 2 external interfaces via two eth cards, both connected to the internet<br>
<br></div>I want to send a udp packet to same host:port, but choose dynamically which interface to use.<br>
<br></div>can this be done with linux, and how ?<br><br><br><br></div>10x<span><font color="#888888"><br></font></span></div><span><font color="#888888">erez.<br></font></span></div>
<br></div></div><div>_______________________________________________<br>
Linux-il mailing list<br>
<a href="mailto:Linux-il@cs.huji.ac.il" target="_blank">Linux-il@cs.huji.ac.il</a><br>
<a href="http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il" target="_blank">http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il</a><br>
<br></div></blockquote></div><br></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>