* IPv6 Redirecting a Port
@ 2008-03-25 15:56 Ryan Kruse
2008-03-25 16:11 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Ryan Kruse @ 2008-03-25 15:56 UTC (permalink / raw)
To: 'netfilter@vger.kernel.org'
We have a network management application that has an embedded TFTP and FTP server. The application is written in Java and runs as an unprivileged user so we can't bind to the well known ports. On linux we bind TFTP and FTP to high ports (udp/11069 and tcp/11021). We then use iptables rules to redirect the incoming low port (udp/69 and tcp/21) connections to the high ports.
Now that our application supports IPv6 I need to do the same for that. I know that ip6tables doesn't support NAT (and shouldn't), but I haven't found a way to redirect a port. Any thoughts on how this can be done?
Thanks much,
Ryan Kruse
www.ziptie.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IPv6 Redirecting a Port
2008-03-25 15:56 IPv6 Redirecting a Port Ryan Kruse
@ 2008-03-25 16:11 ` Patrick McHardy
2008-03-26 16:33 ` Jan Engelhardt
0 siblings, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2008-03-25 16:11 UTC (permalink / raw)
To: Ryan Kruse; +Cc: 'netfilter@vger.kernel.org'
Ryan Kruse wrote:
>
> We have a network management application that has an embedded TFTP and FTP server. The application is written in Java and runs as an unprivileged user so we can't bind to the well known ports. On linux we bind TFTP and FTP to high ports (udp/11069 and tcp/11021). We then use iptables rules to redirect the incoming low port (udp/69 and tcp/21) connections to the high ports.
>
> Now that our application supports IPv6 I need to do the same for that. I know that ip6tables doesn't support NAT (and shouldn't), but I haven't found a way to redirect a port. Any thoughts on how this can be done?
Routing by fwmark *might* work (add a new "local" table and a rule
pointing to it, mark packets appropriately, bind to ::0). If that
doesn't you'll most likely need a IPv6-capable TPROXY version.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IPv6 Redirecting a Port
2008-03-25 16:11 ` Patrick McHardy
@ 2008-03-26 16:33 ` Jan Engelhardt
2008-03-26 16:44 ` Patrick McHardy
0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2008-03-26 16:33 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Ryan Kruse, 'netfilter@vger.kernel.org'
On Tuesday 2008-03-25 17:11, Patrick McHardy wrote:
> Ryan Kruse wrote:
>>
>> We have a network management application that has an embedded TFTP and FTP
>> server. The application is written in Java and runs as an unprivileged
>> user so we can't bind to the well known ports. On linux we bind TFTP and
>> FTP to high ports (udp/11069 and tcp/11021). We then use iptables rules to
>> redirect the incoming low port (udp/69 and tcp/21) connections to the high
>> ports.
>>
>> Now that our application supports IPv6 I need to do the same for that. I
>> know that ip6tables doesn't support NAT (and shouldn't), but I haven't
>> found a way to redirect a port. Any thoughts on how this can be done?
>
>
> Routing by fwmark *might* work (add a new "local" table and a rule
> pointing to it, mark packets appropriately, bind to ::0). If that
> doesn't you'll most likely need a IPv6-capable TPROXY version.
But how does routing change the destination port? It does not...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: IPv6 Redirecting a Port
2008-03-26 16:33 ` Jan Engelhardt
@ 2008-03-26 16:44 ` Patrick McHardy
0 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2008-03-26 16:44 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Ryan Kruse, 'netfilter@vger.kernel.org'
Jan Engelhardt wrote:
>
> On Tuesday 2008-03-25 17:11, Patrick McHardy wrote:
>> Ryan Kruse wrote:
>>>
>>> We have a network management application that has an embedded TFTP
>>> and FTP
>>> server. The application is written in Java and runs as an unprivileged
>>> user so we can't bind to the well known ports. On linux we bind
>>> TFTP and
>>> FTP to high ports (udp/11069 and tcp/11021). We then use iptables
>>> rules to
>>> redirect the incoming low port (udp/69 and tcp/21) connections to
>>> the high
>>> ports.
>>>
>>> Now that our application supports IPv6 I need to do the same for
>>> that. I
>>> know that ip6tables doesn't support NAT (and shouldn't), but I haven't
>>> found a way to redirect a port. Any thoughts on how this can be done?
>>
>>
>> Routing by fwmark *might* work (add a new "local" table and a rule
>> pointing to it, mark packets appropriately, bind to ::0). If that
>> doesn't you'll most likely need a IPv6-capable TPROXY version.
>
> But how does routing change the destination port? It does not...
Right, not the port of course, I misread the mail.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-26 16:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25 15:56 IPv6 Redirecting a Port Ryan Kruse
2008-03-25 16:11 ` Patrick McHardy
2008-03-26 16:33 ` Jan Engelhardt
2008-03-26 16:44 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox