All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Leandro Silva" <lansoweb@gmail.com>
To: Nilesh <niluforalways@yahoo.com>
Cc: iptables <netfilter@lists.netfilter.org>, iptables@linuxguruz.com
Subject: Re: port forwarding form IP range
Date: Sat, 11 Mar 2006 09:40:23 -0300	[thread overview]
Message-ID: <581260b00603110440y7cca1117o@mail.gmail.com> (raw)
In-Reply-To: <20060311122437.15645.qmail@web50511.mail.yahoo.com>

Hello !

You can use something like that:

iptables -I PREROUTING -t nat -s 192.168.0.10 -p tcp --dport 80 -j
DNAT --to 192.168.0.3:3128
iptables -I PREROUTING -t nat -s 192.168.0.10 -p tcp --dport 3128 -j
DNAT --to 192.168.0.3:3128

If you have iprange compiled for iptables you can use:

iptables -I PREROUTING -t nat -m iprange --src-range
192.168.0.10-192.168.0.20 -p tcp --dport 80 -j DNAT --to
192.168.0.3:3128
iptables -I PREROUTING -t nat -m iprange --src-range
192.168.0.10-192.168.0.20 -p tcp --dport 3128 -j DNAT --to
192.168.0.3:3128

I hope this can help,
Leandro

2006/3/11, Nilesh <niluforalways@yahoo.com>:
> Dear all,
>
> I have two squid proxy servers and two ISP
>
> 1)      192.168.0.1 port 3128
> 2)      192.168.0.3 port 3128
>
> We have around 70 comps assigned IP's between
> 192.168.0.4 to 192.168.0.250
> The default proxy we are using is 192.168.0.1 which is
> on the ISP 1.
> Now I have configured 192.168.0.3 squid proxy server
> on ISP 2 line.
> Both ISP 1 and ISP 2 are landing (connected) on the
> same Switch.
>
> Now I want setup the request coming from IP range
> (192.168.0.10 to 192.168.0.20) for the
> 192.168.0.1:3128
> Will be forward to 192.168.0.3:3128
> So the users from this IP range will access only
> 192.168.0.3 proxy server.
>
> Could any one please help me which rules should I use
> in IPTABLES .
>
> I have attached herewith my rc.firewall file.
>
> Please help me.
>
> Regards
> Nilesh.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
>


  reply	other threads:[~2006-03-11 12:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-11 12:24 port forwarding form IP range Nilesh
2006-03-11 12:40 ` Leandro Silva [this message]
2006-03-13  8:53   ` Nilesh
2006-03-13  9:15     ` Rob Sterenborg
2006-03-13 11:02       ` Nilesh
2006-03-13 11:09         ` Seferovic Edvin
2006-03-13 16:22         ` Rob Sterenborg
     [not found]           ` <20060314103323.21090.qmail@web50515.mail.yahoo.com>
2006-03-14 12:12             ` Rob Sterenborg
2006-03-20  6:54               ` Nilesh
2006-03-20  9:39                 ` Nilesh
2006-03-20 12:39                 ` Rob Sterenborg
  -- strict thread matches above, loose matches on Subject: below --
2006-03-13 11:37 Nilesh
2006-03-13 11:39 Nilesh
2006-03-13 12:04 ` Seferovic Edvin
2006-03-13 13:13 Nilesh
2006-03-14 10:54 Lexx

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=581260b00603110440y7cca1117o@mail.gmail.com \
    --to=lansoweb@gmail.com \
    --cc=iptables@linuxguruz.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=niluforalways@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.