Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2001 14:22:35 +0400
From:      Mike Petrov <mike@deyton.ru>
To:        freebsd-questions@freebsd.org
Subject:   choosing correct source IP on multihomed hosts
Message-ID:  <267957031.20010615142235@deyton.ru>

next in thread | raw e-mail | index | archive | help
Hello.

   How can I forcely say to any program to use certain source IP?
   Some programs allow to specify it - ping,traceroute,squid,etc.
   Many programs do not care about src IP and use ADDR_ANY when
   creating connections on socket. Kernel chooses appropriate IP
   address according to routing table. It chooses first IP of
   interface where packet would be routed. In most cases this is
   default interface. For example, normally program "telnet" uses
   IP of default interface, when I telnet to somewhere in Internet.
   But sometimes I want to force it to use another source IP.
   Good way to do it: make copy of it to "telnet2", change owner to
   special user, set SUID bit.But how set default interface _only_
   for this user to that I need?


--
mike@deyton.ru, ICQ: 9664018



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?267957031.20010615142235>