SIS - Source IP Selector

(c) 2002 Peter Palfrader <peter@palfrader.org>

$Id: README,v 1.2 2002/05/22 22:48:41 weasel Exp $


WHAT
----
 This simple wrapper library allows you to set the source address
 of outgoing TCP and UDP traffic.

DOWNLOAD
--------
 See <URL:http://www.palfrader.org/libsis/>.

WHY?
----
 If you're on a multi homed host with more than one IP address
 the kernel usually select one source address based on varios
 parameters for you if your application does not ask for a
 particular address itself.

 There are applications which let you set the local address
 of all outgoing connections. A prominent example are all sorts
 of IRC clients.

 Most application however don't support this and unless you care for
 your source ip it doesn't matter.

 In some setups however it is important which source address the
 application has. Like when you use source based routing, i.e.
 decide of a packets route not only based on destination but also
 on source address. This makes sense for instance if you have more
 than one connectio to the internet.

HOW?
----
 This library wraps around the libc functions connect() and sendto().

 It then bind()s the socket to the local address specified by the
 SIS_SOURCE environment variable. If the application has already called
 bind() itself another call of bind() should not change anything - not
 that I've tested this.

INSTALL
-------
 Change to the libsis directory and run make. You should find a file
 named libsis.so.

 Set the environment variable LD_PRELOAD to
 /path/to/libisis/directory/libsis.so:
  
   export LD_PRELOAD=/path..../libsis.so
 or if you're using a csh type shell
   setenv LD_PRELOAD /path..../libsis.so

 then set the environment variable SIS_SOURCE:
   
   export SIS_SOURCE=10.151.2.130
 or again in a csh type shell
   setenv SIS_SOURCE 10.151.2.130
 
 Note: Only IP Addresses are allowed, no hostnames.

 Now call your program and it should have its source address set to
 $SIS_SOURCE in outgoing connections.

 You may want to copy the libsis.so* files to a convinient directory.

STATUS
------
 Works for me; does everything I want.

LICENSE
-------
libsis is licensed under the Free Software Foundation's
Gnu General Public License.

CAVEATS
-------
- LD_PRELOAD does not work with suid binaries.
- LD_PRELOAD only works with dynamically linked binaries.

HISTORY
-------
 0.1.1 - 2002-05-23
  Initial Release

Peter
