Opened 10 years ago

Closed 8 years ago

Last modified 3 years ago

#2769 closed defect (duplicate)

Port forwarding redirects to a wrong port

Reported by: emil@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: Cc:


These rules suppose to redirect all incoming traffic to a given IP in the local network:

iptables -t nat -A prerouting_wan -p tcp --dport 3389 -j DNAT --to
iptables -A forwarding_wan -p tcp --dport 3389 -d -j ACCEPT

However PREROUTING-DNAT rule rewrites a destination port to a wrong one. Logs:

IN=eth0.1 OUT=br-lan DST= LEN=60 TOS=0x00 PREC=0x00 TTL=53 ID=31632 DF PROTO=TCP SPT=38563 DPT=3390 WINDOW=5840 RES=0x00 SYN URGP=0

So as a workaround I had to modify my firewall rules to:

iptables -t nat -A prerouting_wan -p tcp --dport 3389 -j DNAT --to
iptables -A forwarding_wan -p tcp --dport 3389 -d -j ACCEPT

Please read also where there are reports from other people

Attachments (0)

Change History (6)

comment:1 Changed 10 years ago by dstensnes

Sadly, the final destination port is not always intended port +1, so that rule you wrote in the bugreport will probably fail after a while too. I tried to redirect to port 22, and it ended up on port 27 :/

comment:2 Changed 10 years ago by emil@…

Seems like all these tickets are about the same issue: #2570, #2558

comment:3 Changed 10 years ago by ed.gomez@…

Same problem on a good old wrt54g, i observe a constant offset of +6 here.

Rebooting doesn't reset the offset.

comment:4 Changed 9 years ago by anonymous

I see this bug too, extremely annoying. Just because of this router needs reboot once a day.

comment:5 Changed 8 years ago by florian

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #2558.

comment:6 Changed 3 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.