All of lore.kernel.org
 help / color / mirror / Atom feed
* udp portforward on same interface
@ 2003-07-14 18:06 Amir Zangeneh
  2003-07-15 12:36 ` Patrick McHardy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Amir Zangeneh @ 2003-07-14 18:06 UTC (permalink / raw)
  To: netfilter-devel

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

Hi

I'm using iptables as a firewall system and I'm very pleased. But I'm trying to make a rule which forwards a udp port to another on the same interface.. I want users who connect to port 78 be redirected to port 98.. Is it possible to do this with iptables? If yes.. Could someone give me an example.. thank you..


Amir

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

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

* Re: udp portforward on same interface
  2003-07-14 18:06 udp portforward on same interface Amir Zangeneh
@ 2003-07-15 12:36 ` Patrick McHardy
  2003-07-15 13:37 ` Sven Schuster
  2003-07-15 13:38 ` Sven Schuster
  2 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2003-07-15 12:36 UTC (permalink / raw)
  To: Amir Zangeneh; +Cc: netfilter-devel

This doesn't belong on netfilter-devel as it's clearly a user question which
can even be easily answered by looking at the manpage.

Example:
iptables -t nat -A PREROUTING -i <if> -p udp --dport 78 -j REDIRECT 
--to-ports 98
iptables -A INPUT -i <if> -p tcp --dport 98 -j ACCEPT

Bye
Patrick

Amir Zangeneh wrote:

> Hi
>  
> I'm using iptables as a firewall system and I'm very pleased. But I'm 
> trying to make a rule which forwards a udp port to another on the same 
> interface.. I want users who connect to port 78 be redirected to port 
> 98.. Is it possible to do this with iptables? If yes.. Could someone 
> give me an example.. thank you..
>  
>  
> Amir

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

* Re: udp portforward on same interface
  2003-07-14 18:06 udp portforward on same interface Amir Zangeneh
  2003-07-15 12:36 ` Patrick McHardy
@ 2003-07-15 13:37 ` Sven Schuster
  2003-07-15 13:38 ` Sven Schuster
  2 siblings, 0 replies; 4+ messages in thread
From: Sven Schuster @ 2003-07-15 13:37 UTC (permalink / raw)
  To: Amir Zangeneh; +Cc: netfilter-devel


Hello,

first of all this is the the netfilter developing mailing list, maybe
you try the users mailing list next time?? ;-)

What you want to do can easily be done with the REDIRECT
target. Try something like

iptables -t nat -A PREROUTING -p udp --dport 78 -j REDIRECT --to-ports 98

Hope this helps ;-)

Sven


Amir Zangeneh wrote:

> Hi
>  
> I'm using iptables as a firewall system and I'm very pleased. But I'm 
> trying to make a rule which forwards a udp port to another on the same 
> interface.. I want users who connect to port 78 be redirected to port 
> 98.. Is it possible to do this with iptables? If yes.. Could someone 
> give me an example.. thank you..
>  
>  
> Amir

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

* Re: udp portforward on same interface
  2003-07-14 18:06 udp portforward on same interface Amir Zangeneh
  2003-07-15 12:36 ` Patrick McHardy
  2003-07-15 13:37 ` Sven Schuster
@ 2003-07-15 13:38 ` Sven Schuster
  2 siblings, 0 replies; 4+ messages in thread
From: Sven Schuster @ 2003-07-15 13:38 UTC (permalink / raw)
  To: Amir Zangeneh; +Cc: netfilter-devel


Uhhh, and don't forget to ACCEPT traffic for UDP port 98
in filter table INPUT

Sven



Amir Zangeneh wrote:

> Hi
>  
> I'm using iptables as a firewall system and I'm very pleased. But I'm 
> trying to make a rule which forwards a udp port to another on the same 
> interface.. I want users who connect to port 78 be redirected to port 
> 98.. Is it possible to do this with iptables? If yes.. Could someone 
> give me an example.. thank you..
>  
>  
> Amir

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

end of thread, other threads:[~2003-07-15 13:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-14 18:06 udp portforward on same interface Amir Zangeneh
2003-07-15 12:36 ` Patrick McHardy
2003-07-15 13:37 ` Sven Schuster
2003-07-15 13:38 ` Sven Schuster

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.