Great Circle Associates Firewalls
(October 1995)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: tool for IP-source-routed packets
From: bret @ real . com (Bret McDanel)
Date: Fri, 27 Oct 1995 15:49:21 GMT
To: firewalls @ greatcircle . com

> This comes up from time to time.  The BSD telnet will do it, meaning that
> you can get it from any of the BSD source archives.  You're already using
> it with your FreeBSD, NetBSD, &c.  (Don't know about Linux.)
> 
> The trick is that it's not documented in the man page.  The syntax is
> discernable from the source.  It's something like "telnet @hop1 @
 hop2:dest". 
> 
Tried it on the following systems..
Sunos 4.1.3_U1
Solaris 2.3
HPUX 10
AIX 3.2
Linux (slackware 2.x release)

All failed because it tried to do a dns lookup on @hop1:dest (yes I used
real machine names :)


> It's also been suggested here that this is easy enough to do on your own
> with setsockopt(2), though I've never looked into it personally. 
> 
> -KH
> 
Yes it is very easy to do..
The basics for IP source routing would be something like:

  t = buf;
  *t++ = (strict) ? IPOPT_SSRR : IPOPT_LSRR;    /* type */
  *t++ = 3 + 4 * num;                           /* length */
  *t++ = 4;                                     /* pointer */
  for(i=0; i<num; i++) {
    bcopy(&add[i].s_addr, t, 4);
    t += 4;
  }
  *t = IPOPT_NOP;   /* size = 3 + 4 * num,  pad out to multiple of 4 */
 
  if( setsockopt(s, IPPROTO_IP, IP_OPTIONS, buf, 4 * (num + 1)) < 0)
    perror("source routing option");

Granted this will not do it alone but it should point anyone with a bit of 
skill in the right direction..


Indexed By Date Previous: Re: One Time Pad encryption over the Internet, securely?
From: Rick Smith <smith @ sctc . com>
Next: DNS consolidation
From: Gary Hull <ggh14854 @ ussun2f . glaxo . com>
Indexed By Thread Previous: Re: tool for IP-source-routed packets
From: Ken Hardy <ken @ bridge . com>
Next: Re: tool for IP-source-routed packets
From: Ken Hardy <ken @ bridge . com>

Google
 
Search Internet Search www.greatcircle.com