sending through non-default gateway

N

Nikola Skoric

Is there a way to create a TCP connection using a gateway of my
choice?

I have a regular user account on a WinXP machine. It has a DNS server
and default gateway configured, and that DNS server and default
gateway don't see the rest of the Internet, just the local
network. But, I know an IP address of another DNS/gateway pair which
is used to access the Internet, and I can ping them (and send nslookup
queries) from my machine.

So, is there a way to tell python "don't use my default gateway, here
is an address of the gateway I want you to use"? I've been googling,
but to no avail...
 
D

Dan Stromberg

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.
 
N

Nikola Skoric

Dana Sat, 5 Feb 2011 14:13:11 -0800,
Dan Stromberg said:
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?
 
J

Jean-Paul Calderone

Dana Sat, 5 Feb 2011 14:13:11 -0800,



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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top