Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I use UFW and here is my setup:

eth0 is configured as a bridge interface (br0):

inet adr:  Bcast:  Mask:

eth2 is connected to a private network:

inet adr:  Bcast:  Mask:

I setup a route to on ifup:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UGH   0      0        0 eth2

A machine on the side needs to access the computer at on port 50417. SO, basically all I need is a port forwarding from to

Here what I have added to my before.rules, at the very top:

# rules.before
# Rules that should be run before the ufw command line added rules. Custom
# rules should be added to one of these chains:
#   ufw-before-input
#   ufw-before-output
#   ufw-before-forward

# NAT table rules

# Forward traffic from eth0 (br0) through eth2.
-A PREROUTING -i eth2 -p tcp --dport 50417 -j DNAT --to


# Don't delete these required lines, otherwise there will be errors

But it is not working at all even after a server reboot. (I get a timeout)

What have I done wrong ?


share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.