Networking Forums

Networking Forums > Computer Networking > Linux Networking > IPtables - port routing, beginner question

Reply
Thread Tools Display Modes

IPtables - port routing, beginner question

 
 
uk
Guest
Posts: n/a

 
      09-25-2003, 01:45 PM
Hi,

I'm distributing Java app to SuSe 7.2
I have one problem, I need to receive UDP packets on port 67 (bootp) on
Windows that's OK but on Linux I can't bind to the port <1024.
Is there a way to route packets from port 67 to some port > 1024 using linux
IPtables or some other way, I tried several combinations with no success.

iptables -t nat -A PREROUTING -i 10.254.254.1 -p udp --dport 67 -j
REDIRECT --to-port 6700
iptables -t nat -A OUTPUT -p udp -d 10.254.254.1 --dport 67 -j
REDIRECT --to 6700

With tcpdump (tcpdump udp port 67) I can see that packets are coming to the
port 67, but nothing to the port 6700.

Thanx
 
Reply With Quote
 
 
 
 
Tim Sampson
Guest
Posts: n/a

 
      09-25-2003, 03:22 PM
"uk" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...

> Is there a way to route packets from port 67 to some port > 1024 using

linux
> IPtables or some other way, I tried several combinations with no success.
>
> iptables -t nat -A PREROUTING -i 10.254.254.1 -p udp --dport 67 -j
> REDIRECT --to-port 6700
> iptables -t nat -A OUTPUT -p udp -d 10.254.254.1 --dport 67 -j
> REDIRECT --to 6700


Hi

Try the following instead of REDIRECT --to-port

-j DNAT --to

Cheers
Tim


 
Reply With Quote
 
Adam Dyga
Guest
Posts: n/a

 
      09-25-2003, 09:16 PM
uk wrote:

> Hi,
>
> I'm distributing Java app to SuSe 7.2
> I have one problem, I need to receive UDP packets on port 67 (bootp) on
> Windows that's OK but on Linux I can't bind to the port <1024.
> Is there a way to route packets from port 67 to some port > 1024 using
> linux IPtables or some other way, I tried several combinations with no
> success.
>
> iptables -t nat -A PREROUTING -i 10.254.254.1 -p udp --dport 67 -j
> REDIRECT --to-port 6700
> iptables -t nat -A OUTPUT -p udp -d 10.254.254.1 --dport 67 -j
> REDIRECT --to 6700


Try this one:
iptables -t nat -A PREROUTING -d 10.254.254.1 -p udp --dport 67 -j
REDIRECT --to-port 6700

Sniff on lo interface if you want to see redirected packets in tcpdump.

--
Greets
adeon
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables question on forwarded port with a router sbannecy Linux Networking 2 09-20-2007 09:43 PM
iptables port forwarding question ~David~ Linux Networking 2 01-09-2007 01:55 PM
iptables port forward question Ken Williams Linux Networking 2 07-21-2006 08:55 PM
Routing / Port forwarding question Otto Network Routers 4 11-09-2004 10:59 AM
Beginner question, port forwarding uk Linux Networking 4 09-30-2003 07:58 AM



1 2 3 4 5 6 7 8 9 10 11