sending through non-default gateway

Jean-Paul Calderone calderone.jeanpaul at gmail.com
Sun Feb 6 19:01:17 CET 2011


On Feb 6, 1:10 am, Nikola Skoric <n... at fly.srk.fer.hr> wrote:
> Dana Sat, 5 Feb 2011 14:13:11 -0800,
> Dan Stromberg <drsali... at gmail.com> kaze:
>
> > IIRC, this is an instance of what's called "source routing", and was
> > largely shut off after network admins realized it was a security
> > issue.
>
> > Of course, if you have root/administrator permission, you could
> > probably do it.  But if you have that, you could probably just fix the
> > routing table.
>
> Yeah, I don't have admin priviledges, it's my office computer which is
> supposed to be cut of the Internet.
>
> I did a bit of reading on source routing and I'd like to try it. Just
> for fun, in case our router accepts such packets. So, is there a way
> to do it in python?

You don't need real source routing (and real source routed packets
will probably be dropped by the first router that sees them).  You
just need to make a different decision at the first hop.  You can do
this with the SO_BINDTODEVICE option on a raw socket.  But this
probably also requires administrative privileges.

Jean-Paul



More information about the Python-list mailing list