From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Amir Zangeneh" Subject: udp portforward on same interface Date: Mon, 14 Jul 2003 20:06:40 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_060B_01C34A43.706F1C20" Return-path: To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_060B_01C34A43.706F1C20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 ------=_NextPart_000_060B_01C34A43.706F1C20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
 
I'm using iptables as a = firewall system=20 and I'm very pleased. But I'm trying to make a rule which forwards a udp = port to=20 another on the same interface.. I want users who connect to port 78 be=20 redirected to port 98.. Is it possible to do this with iptables? If = yes.. Could=20 someone give me an example.. thank you..
 
 
Amir
------=_NextPart_000_060B_01C34A43.706F1C20-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: Re: udp portforward on same interface Date: Tue, 15 Jul 2003 14:36:18 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <3F13F542.4010301@trash.net> References: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netfilter-devel@lists.netfilter.org Return-path: To: Amir Zangeneh In-Reply-To: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org 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 -p udp --dport 78 -j REDIRECT --to-ports 98 iptables -A INPUT -i -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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sven Schuster Subject: Re: udp portforward on same interface Date: Tue, 15 Jul 2003 15:37:02 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <3F14037E.8050206@gmx.de> References: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netfilter-devel@lists.netfilter.org Return-path: To: Amir Zangeneh In-Reply-To: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sven Schuster Subject: Re: udp portforward on same interface Date: Tue, 15 Jul 2003 15:38:20 +0200 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <3F1403CC.4060208@gmx.de> References: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: netfilter-devel@lists.netfilter.org Return-path: To: Amir Zangeneh In-Reply-To: <060e01c34a32$ad0df860$15d2f181@TheTraveller> Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org 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