linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Blocking bind to outbound interface?
@ 2001-08-28  1:57 Nathan Neulinger
  2001-08-28  3:22 ` David Ford
  2001-08-28  3:23 ` David Ford
  0 siblings, 2 replies; 3+ messages in thread
From: Nathan Neulinger @ 2001-08-28  1:57 UTC (permalink / raw)
  To: linux-kernel

Is there any way to block use of an interface for outbound connections?

I have a host who's primary outbound interface is on a private network
(using a private address block for our backbone). Unfortunately, this
means that most applications (those not providing an option to select
bind address) will bind to this private-net address when establishing
outbound connections or sending udp packets.

The host has another address which is a publically accessible ip, but
it's not the default route interface.

Is there any way to hide this interface on the host for ALL outbound
connections without modifying all applications/app invocations? Or some
way of overriding the mechanism for selection of default interface.

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
CIS - Systems Programming                Fax: (573) 341-4216

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Blocking bind to outbound interface?
  2001-08-28  1:57 Blocking bind to outbound interface? Nathan Neulinger
@ 2001-08-28  3:22 ` David Ford
  2001-08-28  3:23 ` David Ford
  1 sibling, 0 replies; 3+ messages in thread
From: David Ford @ 2001-08-28  3:22 UTC (permalink / raw)
  To: Nathan Neulinger; +Cc: linux-kernel

Use iproute2.

ip route add <network> via <router> src <preferred interface address>

Of course you could more easily make this public IP the primary address 
on the interface and the private IP secondary...

There are actually a few ways to skin this cat.

-d

Nathan Neulinger wrote:

>Is there any way to block use of an interface for outbound connections?
>
>I have a host who's primary outbound interface is on a private network
>(using a private address block for our backbone). Unfortunately, this
>means that most applications (those not providing an option to select
>bind address) will bind to this private-net address when establishing
>outbound connections or sending udp packets.
>
>The host has another address which is a publically accessible ip, but
>it's not the default route interface.
>
>Is there any way to hide this interface on the host for ALL outbound
>connections without modifying all applications/app invocations? Or some
>way of overriding the mechanism for selection of default interface.
>
>-- Nathan
>
>------------------------------------------------------------
>Nathan Neulinger                       EMail:  nneul@umr.edu
>University of Missouri - Rolla         Phone: (573) 341-4841
>CIS - Systems Programming                Fax: (573) 341-4216
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>


-- 
>:>
I may have the information you need and I may choose only HTML.  It's up to you.




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Blocking bind to outbound interface?
  2001-08-28  1:57 Blocking bind to outbound interface? Nathan Neulinger
  2001-08-28  3:22 ` David Ford
@ 2001-08-28  3:23 ` David Ford
  1 sibling, 0 replies; 3+ messages in thread
From: David Ford @ 2001-08-28  3:23 UTC (permalink / raw)
  To: Nathan Neulinger; +Cc: linux-kernel

Use iproute2.

ip route add <network> via <router> src <preferred interface address>

Of course you could more easily make this public IP the primary address 
on the interface and the private IP secondary...

There are actually a few ways to skin this cat.

-d

Nathan Neulinger wrote:

>Is there any way to block use of an interface for outbound connections?
>
>I have a host who's primary outbound interface is on a private network
>(using a private address block for our backbone). Unfortunately, this
>means that most applications (those not providing an option to select
>bind address) will bind to this private-net address when establishing
>outbound connections or sending udp packets.
>
>The host has another address which is a publically accessible ip, but
>it's not the default route interface.
>
>Is there any way to hide this interface on the host for ALL outbound
>connections without modifying all applications/app invocations? Or some
>way of overriding the mechanism for selection of default interface.
>
>-- Nathan
>
>------------------------------------------------------------
>Nathan Neulinger                       EMail:  nneul@umr.edu
>University of Missouri - Rolla         Phone: (573) 341-4841
>CIS - Systems Programming                Fax: (573) 341-4216
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/
>


-- 
>:>
I may have the information you need and I may choose only HTML.  It's up to you.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-28  3:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-28  1:57 Blocking bind to outbound interface? Nathan Neulinger
2001-08-28  3:22 ` David Ford
2001-08-28  3:23 ` David Ford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).