From: Georgi Alexandrov <georgi.alexandrov@gmail.com>
To: dhottinger@harrisonburg.k12.va.us
Cc: netfilter@lists.netfilter.org
Subject: Re: redirect (nfcan: addressed to exclusive sender for this address)
Date: Fri, 09 Mar 2007 17:07:01 +0200 [thread overview]
Message-ID: <45F17815.6030703@gmail.com> (raw)
In-Reply-To: <20070308095809.0jo1ofvyo80ok88w@webmail.harrisonburg.k12.va.us>
[-- Attachment #1: Type: text/plain, Size: 2288 bytes --]
dhottinger@harrisonburg.k12.va.us wrote:
> Quoting Jim Laurino <nfcan.x.jimlaur@dfgh.net>:
>
>> On 2007.03.08 06:34, dhottinger@harrisonburg.k12.va.us wrote:
>>> Quoting Georgi Alexandrov <georgi.alexandrov@gmail.com>:
>>>
>> .....
>>>>>>> I would like to have any traffic destined for apple.com excluded
>>>>>>> from
>>>>>>> this redirect. I cant seem to get the syntax right. Anyone got any
>>>>>>> ideas?
>>>>>> <snip*>
>>>>>>
>>>>>> iptables -t nat -A PREROUTING -p tcp -i $iface --dport 80 -d
>>>>>> $apples_net
>>>>>> -j RETURN
>>>>>>
>> ....
>>>
>>> $IPC -t nat -A PREROUTING -p tcp -i $IF --dport 80 -d 17.250.0.0
>>> -j RETURN
>>>
>>> Is not routing apple.com traffice away from my proxy. Apple.com
>>> traffic is
>>> still getting routed to proxy server. I have the rule placed above
>>> my dnat
>>> rule for the proxy. Any other ideas?
>>
>> The example was non-specific, -d $apples_net.
>> Your implementation, -d 17.250.0.0, is for a specific ip address.
>> You probably meant to specify a range.
>> Iptables allows you to use netmask or cidr syntax.
>> You can cover all of Apple with 17.0.0.0/8 for instance.
>>
>> --
>> Jim Laurino
>> nfcan.x.jimlaur@dfgh.net
>> Please reply to the list.
>> Only mail from the listserver reaches this address.
>>
>
> Yes I know.
> Sorry I forgot part of my script. I did
> $IPC -t nat -A PREROUTING -p tcp -i $IF --dport 80 -d 17.250.0.0/16 -j
> RETURN
>
> Where $IF is the interface that connects to the internet.
No, it should be the interface that your clients are behind.
First try to imagine it in your head then "draw" it with iptables rules ;-)
"I have to redirect all requests coming from my clients to the proxy
server which is here. But I also want requests that are coming from my
clients destined to apple's networks not hit the proxy and go directly
to apple"
in rules it goes like this:
iptables -t nat -A PREROUTING -p tcp -i $clients_interface --dport 80 -d
17.0.0.0/8 -j RETURN
iptables -t nat -A PREROUTING -p tcp -i $clients_interface --dport 80 -j
DNAT --to $proxy_server:$proxy_port
--
regards,
Georgi Alexandrov
key server - pgp.mit.edu :: key id - 0x37B4B3EE
Key fingerprint = E429 BF93 FA67 44E9 B7D4 F89E F990 01C1 37B4 B3EE
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2007-03-09 15:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 14:42 redirect dhottinger
2007-03-07 16:14 ` redirect Georgi Alexandrov
2007-03-07 16:43 ` redirect dhottinger
2007-03-07 16:50 ` redirect dhottinger
2007-03-08 7:01 ` redirect Georgi Alexandrov
2007-03-08 11:34 ` redirect dhottinger
2007-03-08 14:50 ` redirect (nfcan: addressed to exclusive sender for this address) Jim Laurino
2007-03-08 14:58 ` dhottinger
2007-03-09 15:07 ` Georgi Alexandrov [this message]
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=45F17815.6030703@gmail.com \
--to=georgi.alexandrov@gmail.com \
--cc=dhottinger@harrisonburg.k12.va.us \
--cc=netfilter@lists.netfilter.org \
/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.