title: SO_BINDTODEVICE with curl --interface or CURLOPT_INTERFACE
body: <p>Running this command as non-root user:</p>
  <blockquote>
  <p>curl --interface tun0 <a href="http://google.com" rel="nofollow noreferrer">http://google.com</a> -v</p>
  <p>SO_BINDTODEVICE tun0 failed with errno 1: Operation not permitted;
  will do regular bind</p>
  </blockquote>
  <p>setting <code>curl_setopt($ch, CURLOPT_INTERFACE &quot;tun0&quot;)</code> in php doesn't work either. But,</p>
  <blockquote>
  <p>ping -I tun0 google.com</p>
  </blockquote>
  <p>works fine, so it's only an issue with curl. And it even works with curl for root, but it really should work for non-root users.</p>
  <p>I have an openpvn interface <code>tun0</code> but the same thing happens with <code>lo</code> interface.</p>
  <p>This happens on multiple systems, so is the --interface option just broken in curl or should I use it some other way ? Should I enable something special for curl to be able to use the interface ?</p>