🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.linux
Article #194

Re: IPTables forwarding rule

#194
From: Black Adder
Date: Wed, 21 Jul 2004 11:01
38 lines
2851 bytes
I had a client similar to that too.  I threw in an IPCOP box for them, and
took out the firewall

-- 
----------------------------------------------------------------------------
------------------------------------------------------------
"It's all coming back to me now", said the blind man as he peed into the
wind
"Harry Phillips" <harry@hkjsfh.com> wrote in message
news:i7p1t1-n1u.ln1@free.teranews.com...
> I have a client with a firewall device that has a limited interface to
> iptables (I cannot ssh into it either). All you can do is forward a port
> to another IP address, you can't restrict it to a certain source IP.
>
> I have set it up to forward port 22 to my Linux box, that then has
> IPTables to accept anything local and drop everything else except my
> ADSL modem IP.
>
> Now I want to do a similar thing except forward the packets to another
> internal host. I have no idea where to start and what rules to use. The
> setup is:
>
>                   _____________________
>                  |  (firewall device)  |     |---> |192.168.1.50|
> internet <----> |ext_ip  192.168.1.254| <---|---> |192.168.1.1 |
>                  |_____________________|     |---> |192.168.1.x |
>
>
> I want the Linux box (192.168.1.1) to forward port x to 192.168.1.50,
> but only if the source is my ADSL modem IP.
>
> Do I use the NAT and PREROUTING, POSTROUTING, FORWARD? I have examples
> from the Internet if the Linux box and the host it is forwarding to are
> on different networks but not when they are on the same network.
>
> -- 
> Regards,
> Harry Phillips
Technical Details
Message-ID: <40fe4b29$0$19420$61c65585@uq-127creek-reader-01.brisbane.pipenetworks.com.au>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newspeer1.stngva01.us.to.verio.net!news.verio.net!newsfeed.cwix.com!news1.optus.net.au!optus!news.mel.connect.com.au!news.melbourne.pipenetworks.com!figjam.pipenetworks.com!202.4.251.51.MISMATCH!not-for-mail
References: <i7p1t1-n1u.ln1@free.teranews.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 100c5f,366e92497eb0b79a
X-Google-Thread: faa64,366e92497eb0b79a
X-Google-Thread: f9382,366e92497eb0b79a
X-Google-Thread: 102983,366e92497eb0b79a
X-Google-Attributes: gid100c5f,gidfaa64,gidf9382,gid102983,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Black Adder" <home@home.com>
Newsgroups: alt.linux,alt.os.linux,comp.os.linux,aus.computers.linux
References: <i7p1t1-n1u.ln1@free.teranews.com>
Subject: Re: IPTables forwarding rule
Date: Wed, 21 Jul 2004 21:01:21 +1000
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Lines: 40
Message-ID: <40fe4b29$0$19420$61c65585@uq-127creek-reader-01.brisbane.pipenetworks.com.au>
NNTP-Posting-Host: 202.173.147.132
X-Trace: 1090407209 uq-127creek-reader-01.brisbane.pipenetworks.com.au 19420 202.173.147.132:1206
X-Complaints-To: Abuse, including message IDs to abuse@pipenetworks.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newspeer1.stngva01.us.to.verio.net!news.verio.net!newsfeed.cwix.com!news1.optus.net.au!optus!news.mel.connect.com.au!news.melbourne.pipenetworks.com!figjam.pipenetworks.com!202.4.251.51.MISMATCH!not-for-mail