FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-31-2009, 10:04 PM
Alexander
 
Default redirect connections to localhost

Hi.

Is there a way to redirect TCP connections from external network interfaces to
the local/loopback in network 127.0.0.0/8? I need functionality like DNAT target
in iptables.
 
Old 12-31-2009, 11:07 PM
Etaoin Shrdlu
 
Default redirect connections to localhost

On Thursday 31 December 2009, Alexander wrote:

> Is there a way to redirect TCP connections from external network interfaces
> to the local/loopback in network 127.0.0.0/8? I need functionality like
> DNAT target in iptables.

Uh...why don't you use DNAT then?
 
Old 01-01-2010, 01:37 AM
Alexander
 
Default redirect connections to localhost

On Friday 01 January 2010 03:07:42 Etaoin Shrdlu wrote:
> On Thursday 31 December 2009, Alexander wrote:
> > Is there a way to redirect TCP connections from external network
> > interfaces to the local/loopback in network 127.0.0.0/8? I need
> > functionality like DNAT target in iptables.
>
> Uh...why don't you use DNAT then?
>

This doesn't work, because kernel drops any packets that come from external
network to 127.0.0.0/8.
 
Old 01-01-2010, 05:26 AM
Mike Kazantsev
 
Default redirect connections to localhost

On Fri, 1 Jan 2010 02:04:56 +0300
Alexander <b3nder@yandex.ru> wrote:

> Hi.
>
> Is there a way to redirect TCP connections from external network interfaces to
> the local/loopback in network 127.0.0.0/8? I need functionality like DNAT target
> in iptables.
>

You can use ip-proxy daemon like net-misc/stone or net-proxy/haproxy.


--
Mike Kazantsev // fraggod.net
 
Old 01-01-2010, 10:38 AM
Etaoin Shrdlu
 
Default redirect connections to localhost

On Friday 01 January 2010, Alexander wrote:
> On Friday 01 January 2010 03:07:42 Etaoin Shrdlu wrote:
> > On Thursday 31 December 2009, Alexander wrote:
> > > Is there a way to redirect TCP connections from external network
> > > interfaces to the local/loopback in network 127.0.0.0/8? I need
> > > functionality like DNAT target in iptables.
> >
> > Uh...why don't you use DNAT then?
>
> This doesn't work, because kernel drops any packets that come from external
> network to 127.0.0.0/8.

Of course it does. But in these cases, the workaround is assigning a non-127
address to the lo interface, like 192.168.0.1/32 for example, and DNAT to that
address (and have whatever program should receive the data listen on
192.168.0.1, of course).
 

Thread Tools




All times are GMT. The time now is 09:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org