Results 1 to 3 of 3

Thread: ufw port forwarding

  1. #1
    Join Date
    May 2007

    ufw port forwarding

    I'm running a ubuntu server and just upgraded it from 10.04 to 12.04. I had port forwarding using working fine on it before the distribution upgrade but now after it is no longer working. So I'm now trying to figure out what has gone wrong with the configuration. These files were not changed since the distribution upgrade... any thoughts on how to get it working again?

    before.rules (above *filter)
    :PREROUTING - [0:0]
    # DNAT rules
    # -A PREROUTING -i eth0 -p tcp --dport 3690 -j DNAT --to-destination
    # -A PREROUTING -i eth0 -p udp --dport 3690 -j DNAT --to-destination
    # -A PREROUTING -i eth0 -p tcp --dport 3389 -j DNAT --to-destination
    # -A PREROUTING -i eth0 -p udp --dport 3389 -j DNAT --to-destination
    # -A PREROUTING -i br0 -p tcp --dport 3690 -j DNAT --to-destination
    # -A PREROUTING -i br0 -p udp --dport 3690 -j DNAT --to-destination
    # -A PREROUTING -i tun0 -p tcp --dport 3389 -j DNAT --to-destination
    # -A PREROUTING -i tun0 -p udp --dport 3389 -j DNAT --to-destination
    -A PREROUTING -p tcp --dport 3690 -j DNAT --to-destination
    -A PREROUTING -p udp --dport 3690 -j DNAT --to-destination

    before.rules (at end of file before last commit)
    # Open VPN Bridge Forward
    -A INPUT -i tap0 -j ACCEPT
    -A INPUT -i br0 -j ACCEPT
    -A INPUT -i eth0 -j ACCEPT
    -A FORWARD -i br0 -j ACCEPT
    -A FORWARD -i eth0 -j ACCEPT
    -A FORWARD -p tcp -d --dport 3690 -j ACCEPT
    -A FORWARD -p udp -d --dport 3690 -j ACCEPT

    /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
    /sbin/iptables -t nat -A POSTROUTING -o br0 -j MASQUERADE
    route add default gw

  2. #2
    Join Date
    May 2007

    Re: ufw port forwarding

    I should also mention that net.ipv4.ip_forward=1 is commented in sysctl.conf

  3. #3
    Join Date
    May 2007

    Re: ufw port forwarding

    Ended up using rinetd, much simpler and seems to be working as advertised.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts