Find the answer to your Linux question:
Results 1 to 3 of 3
Hey everyone, I have a Windows computer that connects to the internet through my server which runs on Damn Small Linux. I want to be able to connect directly to ...
  1. #1
    Just Joined! Twisted-Daemon's Avatar
    Join Date
    Apr 2007
    Posts
    2

    Question IPTABLES Port Forwarding

    Hey everyone,

    I have a Windows computer that connects to the internet through my server which runs on Damn Small Linux.

    I want to be able to connect directly to the Windows computer via VNC. I'm trying to do it by editing IPTABLES to direct traffic on port 5903 on the server to port 5900 on the Windows machine.

    I've used this code to do that :
    Code:
    iptables -t nat -A PREROUTING -p tcp -d 82.xxx.xxx.xxx --dport 5903 -j DNAT --to 192.xxx.xxx.xxx:5900
    When I try to VNC the server on port 5903 it tries to connect but eventually fails. Is there anything else that I need to do to make this work? Is the code I've used even correct?

    This is my first post and I had no idea where to post this.
    Any help greatly appreciated

  2. #2
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    I don't have an answer to your question but I would recommend aliasing the IP address in the command you posted with something like:
    Code:
    iptables -t nat -A PREROUTING -p tcp -d 82.x.x.x --dport 5903 -j DNAT --to 192.168.0.25:5900
    Your IP is not a necessary piece of information for your problem and I just ran nmap against your IP and found a lot of open ports. No need to take any security risks by posting your IP address.

  3. #3
    Just Joined! Twisted-Daemon's Avatar
    Join Date
    Apr 2007
    Posts
    2
    Thanks, I'll keep that in mind for my next post.

    Anyone have any ideas with my port forwarding problem though?

Posting Permissions

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