All of lore.kernel.org
 help / color / mirror / Atom feed
* REDIRECT
@ 2004-12-13  8:05 r00t
  2004-12-13 10:23 ` REDIRECT Henrik Nordstrom
  0 siblings, 1 reply; 17+ messages in thread
From: r00t @ 2004-12-13  8:05 UTC (permalink / raw)
  To: netfilter-devel

Hi all,

How to i make by libipq  this rule:

-j REDIRECT --to-ports 3128 ?

-- 
With regards,
 Meg

^ permalink raw reply	[flat|nested] 17+ messages in thread
* redirect
@ 2007-03-06 14:42 dhottinger
  2007-03-07 16:14 ` redirect Georgi Alexandrov
  0 siblings, 1 reply; 17+ messages in thread
From: dhottinger @ 2007-03-06 14:42 UTC (permalink / raw)
  To: netfilter@lists.netfilter.org

I currently redirect all traffic on port 80 to my proxy server with
$IPC -t nat -A PREROUTING -p tcp -i ! $IF --dport 80    -s !  
204.111.40.0/24 -d ! 204.111.40.0/24 -j DNAT --to-destination  
$PROXY_IP:8080

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?

thanks,

ddh

-- 
Dwayne Hottinger
Network Administrator
Harrisonburg City Public Schools



^ permalink raw reply	[flat|nested] 17+ messages in thread
* redirect
@ 2007-03-02 12:41 dhottinger
  2007-03-02 12:51 ` redirect TheGesus
  0 siblings, 1 reply; 17+ messages in thread
From: dhottinger @ 2007-03-02 12:41 UTC (permalink / raw)
  To: netfilter@lists.netfilter.org

I posted a question yesterday and I dont think I worded it very well.   
Im having problems with software updates on Apple computers.  I think  
it is an issue with my squid proxy server.  So I would like to make a  
rule set that says redirect all port 80 traffic except traffic going  
to apple.com's software update servers.  When connecting to apple  
software updates you connect to swscan.apple.com which downloads an  
xml file, then get redirected to an akamaitechnologies.com server for  
the downloads.  Im not quite certain yet why things are failing with  
my squid proxy server in the loop, but going around it lets the  
software updates work.  So, if any of the iptables gurus have a  
formula for this I would be very happy to try.

thanks,

ddh


-- 
Dwayne Hottinger
Network Administrator
Harrisonburg City Public Schools



^ permalink raw reply	[flat|nested] 17+ messages in thread
* redirect
@ 2005-05-13 14:28 ngabor
  0 siblings, 0 replies; 17+ messages in thread
From: ngabor @ 2005-05-13 14:28 UTC (permalink / raw)
  To: netfilter

Hi.

Main firewall PREROUTING Chain:
ACCEPT     all  --  192.168.10.x0       0.0.0.0/0
ACCEPT     all  --  192.168.10.x1       0.0.0.0/0
...
DNAT       tcp  --  0.0.0.0/0            x.y.z.v       multiport dports
80,22,8180 to:192.168.30.y
REDIRECT   tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 redir
ports 80

192.168.10.x0, 192.168.10.x1 internet enabled,
other internal ip 192.168.10._ redirect main server 80 port.
server x.y.z.v DNAT DMZ,
if 192.168.10.x0, 192.168.10.x1 send http: to x.y.z.v pub.ip-address,
then send my REDIRECTED SERVER.
WHILE?

by gab





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


^ permalink raw reply	[flat|nested] 17+ messages in thread
* REDIRECT
@ 2004-12-13 13:36 r00t
  2004-12-13 14:11 ` REDIRECT Meg
  2004-12-13 15:59 ` REDIRECT Henrik Nordstrom
  0 siblings, 2 replies; 17+ messages in thread
From: r00t @ 2004-12-13 13:36 UTC (permalink / raw)
  To: netfilter-devel

Hi all,
>> How to i make by libipq  this rule:
>> -j REDIRECT --to-ports 3128 ?

>You don't.
>REDIRECT or other NAT related operations must be done in the kernel.

Ok, but if i use this:

-A PREROUTING -p tcp -j QUEUE
-A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

And in the program:

ipq_set_verdict(h, m->packet_id,NF_ACCEPT, 0, NULL);

the packet not going to second rule(REDIRECT)

Sorry to my english
Best regards, Meg

^ permalink raw reply	[flat|nested] 17+ messages in thread
* RE: REDIRECT
@ 2003-08-07 21:53 George Vieira
  0 siblings, 0 replies; 17+ messages in thread
From: George Vieira @ 2003-08-07 21:53 UTC (permalink / raw)
  To: jmurlick, netfilter

[-- Attachment #1: Type: text/plain, Size: 2789 bytes --]

Please don't use the word "it" as "it" doesn't define the problem.
 
You have 3 networks (192.168.1.0/24,10.0.0.X,172.16.15.X), are all the default gateways been defined?
Have you done a tcpdump and log packets to determine where it's getting stuck?
 
Your problem is most likely that Server1 either doesn't have routes for those networks (since your not using MASQUERADE) or you have DROP rules which aren't shown on this email.
Are all the default policies ACCEPT or DROP or what?

Thanks,

 
____________________________________________
George Vieira
Citadel Computer Systems Pty Ltd Systems Manager georgev AT citadelcomputer DOT com DOT au 
Citadel Computer Systems Pty Ltd
Phone : +61 2 9955 2644 HelpDesk: +61 2 9955 2698  <http://www.citadelcomputer.com.au/> http://www.citadelcomputer.com.au
 
 
-----Original Message-----
From: Juliano Murlick [mailto:jmurlick@sicredi.com.br]
Sent: Friday, August 08, 2003 3:38 AM
To: netfilter@lists.netfilter.org
Subject: REDIRECT
Importance: High


Hello All,
I wanna rediect all conections from 192.168.1.0/24 network to a 10.0.0.2 server on 80 port for a 172.65.15.11 server, also on  80 port,  for that, i did some things: 
 
1 - All rules/iptables is on route 1;
2 - The route 2 don't filter any packet, just route, i can ping from a client machine (192.168.1.25) to the both server and connect to a 80 port on both server, and then, i don't have any problem of routing. When a read the rules i can't connect any more on server 10.0.0.2, just direct to a server 172.16.15.11;
3 - My rules on iptables are:
 
    iptables -A FORWARD -p tcp -s 192.168.1.0/24 --sport 1024:65535 -d 10.0.0.2--dport 80 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.1.0/24 --sport 1024:65535 -d 172.16.15.11--dport 80 -j ACCEPT
    iptables -t nat -A PREROUTING -p tcp --sport 1024:65535 -d 10.0.0.2 --dport 80 -j DNAT --to 172.16.15.11:80

 
 
                                                         (Server 1)
                                                        +----------+
      (Client)           ( Linux - Router 1)       |----| 10.0.0.2 |
 +---------------+    +-----------------------+    |    +----------+
 | 192.168.1.25  |----|192.168.1.1 / 10.0.0.1 |----|                     
 +---------------+    +-----------------------+    |          (Route 2)                (Server 2)
                                                   |    +----------------------+    +--------------+
                                                   |----|10.0.0.3 / 172.16.15.1|----| 172.16.15.11 |
                                                        +----------------------+    +--------------+
 
 
But it doesn't working ... anyone has any idea ??? 
 
Thanks in advance!
 
Att,
Juliano Murlick
 

[-- Attachment #2: Type: text/html, Size: 12186 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* REDIRECT
@ 2003-08-07 19:22 Juliano Murlick
  0 siblings, 0 replies; 17+ messages in thread
From: Juliano Murlick @ 2003-08-07 19:22 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

Hello All,
I wanna rediect all conections from 192.168.1.0/24 network to a 10.0.0.2
server on 80 port for a 172.65.15.11 server, also on  80 port,  for that, i
did some things: 
 
1 - All rules/iptables is on route 1;
2 - The route 2 don't filter any packet, just route, i can ping from a
client machine (192.168.1.25) to the both server and connect to a 80 port on
both server, and then, i don't have any problem of routing. When a read the
rules i can't connect any more on server 10.0.0.2, just direct to a server
172.16.15.11;
3 - My rules on iptables are:
 
    iptables -A FORWARD -p tcp -s 192.168.1.0/24 --sport 1024:65535 -d
10.0.0.2--dport 80 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.1.0/24 --sport 1024:65535 -d
172.16.15.11--dport 80 -j ACCEPT
    iptables -t nat -A PREROUTING -p tcp --sport 1024:65535 -d 10.0.0.2
--dport 80 -j DNAT --to 172.16.15.11:80

 
 
                                                         (Server 1)
                                                        +----------+
      (Client)           ( Linux - Router 1)       |----| 10.0.0.2 |
 +---------------+    +-----------------------+    |    +----------+
 | 192.168.1.25  |----|192.168.1.1 / 10.0.0.1 |----|                     
 +---------------+    +-----------------------+    |          (Route 2)
(Server 2)
                                                   |
+----------------------+    +--------------+
                                                   |----|10.0.0.3 /
172.16.15.1|----| 172.16.15.11 |
 
+----------------------+    +--------------+
 
 
But it doesn't working ... anyone has any idea ??? 
 
Thanks in advance!
 
Att,
Juliano Murlick
 

[-- Attachment #2: Type: text/html, Size: 7869 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread
* REDIRECT
@ 2003-08-07 17:37 Juliano Murlick
  0 siblings, 0 replies; 17+ messages in thread
From: Juliano Murlick @ 2003-08-07 17:37 UTC (permalink / raw)
  To: netfilter

[-- Attachment #1: Type: text/plain, Size: 1708 bytes --]

Hello All,
I wanna rediect all conections from 192.168.1.0/24 network to a 10.0.0.2
server on 80 port for a 172.65.15.11 server, also on  80 port,  for that, i
did some things: 
 
1 - All rules/iptables is on route 1;
2 - The route 2 don't filter any packet, just route, i can ping from a
client machine (192.168.1.25) to the both server and connect to a 80 port on
both server, and then, i don't have any problem of routing. When a read the
rules i can't connect any more on server 10.0.0.2, just direct to a server
172.16.15.11;
3 - My rules on iptables are:
 
    iptables -A FORWARD -p tcp -s 192.168.1.0/24 --sport 1024:65535 -d
10.0.0.2--dport 80 -j ACCEPT
    iptables -A FORWARD -p tcp -s 192.168.1.0/24 --sport 1024:65535 -d
172.16.15.11--dport 80 -j ACCEPT
    iptables -t nat -A PREROUTING -p tcp --sport 1024:65535 -d 10.0.0.2
--dport 80 -j DNAT --to 172.16.15.11:80

 
 
                                                         (Server 1)
                                                        +----------+
      (Client)           ( Linux - Router 1)       |----| 10.0.0.2 |
 +---------------+    +-----------------------+    |    +----------+
 | 192.168.1.25  |----|192.168.1.1 / 10.0.0.1 |----|                     
 +---------------+    +-----------------------+    |          (Route 2)
(Server 2)
                                                   |
+----------------------+    +--------------+
                                                   |----|10.0.0.3 /
172.16.15.1|----| 172.16.15.11 |
 
+----------------------+    +--------------+
 
 
But it doesn't working ... anyone has any idea ??? 
 
Thanks in advance!
 
Att,
Juliano Murlick
 

[-- Attachment #2: Type: text/html, Size: 7869 bytes --]

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

end of thread, other threads:[~2007-03-08 11:34 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-13  8:05 REDIRECT r00t
2004-12-13 10:23 ` REDIRECT Henrik Nordstrom
  -- strict thread matches above, loose matches on Subject: below --
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-02 12:41 redirect dhottinger
2007-03-02 12:51 ` redirect TheGesus
2005-05-13 14:28 redirect ngabor
2004-12-13 13:36 REDIRECT r00t
2004-12-13 14:11 ` REDIRECT Meg
2004-12-13 15:59 ` REDIRECT Henrik Nordstrom
2003-08-07 21:53 REDIRECT George Vieira
2003-08-07 19:22 REDIRECT Juliano Murlick
2003-08-07 17:37 REDIRECT Juliano Murlick

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.