Find the answer to your Linux question:
Results 1 to 4 of 4
hi there, i want to make my linux server (FC to port forward to another server of mine (windows 2003), so basicaly whats comeing to server1 on port 84 to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    2

    linux port forward problem


    hi there,

    i want to make my linux server (FC to port forward to another server of mine (windows 2003), so basicaly whats comeing to server1 on port 84 to be forwarded to server2 on port 84

    this is what i tryed on server1 but its not working:

    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -d server2 -j MASQUERADE
    iptables -t nat -A PREROUTING -i eth0 -p tcp -d server1 --dport 84 -j DNAT --to server2

    Please advice

    note: the servers are in diferent networks from diferent providers

    Thanks

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    You just need to change the format of your DNAT statemnent.
    Check this DNAT how-to out

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    May 2009
    Posts
    2
    i tryed

    $iptables -t nat -A PREROUTING --dst $server1 -p tcp --dport 84 -j DNAT --to-destination $server2
    $iptables -t nat -A OUTPUT --dst $server1 -p tcp --dport 84 -j DNAT --to-destination $server2

    still not work

    can someone explain me exactly what i need to put there to make it work?
    thanks

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    They look good is the winbox setup to listen for port 84 connections?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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