Results 1 to 3 of 3

Thread: Port Forwarding on a single Interface machine

  1. #1
    Join Date
    Aug 2010

    Post Port Forwarding on a single Interface machine

    Hi Everyone,

    I am trying to set up an environment where I want to forward any request coming in on my Linux Cent OS machine on port 8081 to a Windows XP machine port No 8081. Both the machines have got single Interface and are on the same LAN.

    I tried using iptables and shorewall for achieving the same but somehow they didn't seem to work.

    For iptables I used the following rules:
    iptables -t nat -A PREROUTING -p tcp -d 192.168.152.xx --dport 8081 -j DNAT --to-destination 192.168.152.yy:8081

    I am not sure why it is not working. Does it have to do anythg the single Ethernet card on the source machine(192.168.152.xx). Do I need to necessarily have two interfaces on the source to get this working.

    Please guide me how can I achieve the same and the best possible way to debug if I am using the correct steps.

  2. #2
    Join Date
    Jan 2006

    Re: Port Forwarding on a single Interface machine

    You have to make sure your server allow the other server access the port 8081, so mostly you need to change your firewall. Have you enabled port forwarding in '/etc/sysctl.conf' ? Something like below you should try:

    internet --> router --> centos ---> windows
    IP --> router --> centos IP:1234 --> windows:3389

  3. #3
    Join Date
    Aug 2010

    Re: Port Forwarding on a single Interface machine

    Hi Janos,

    Thanks for your inputs.

    I am sure that I have enabled the port forwarding in /etc/sysctrl.conf as well as allowed the required ports on the Cent OS machine using the IPtables. The ports on the windows machines are also accessible and have verified using by telnet on windows. But when I try using telnet on linux machine, on the using local host & fwd port, I have observed that it just get stuck on "trying to connect with" .

    Is there any better way to try and debug the problem? Also, Is it possible or not to test the port forwarding using localhost or IP address from the same machine, or do I need to test it though the Internet or the Router?


Similar Threads

  1. Replies: 4
    Last Post: 29-10-2011, 09:15 AM
  2. Replies: 5
    Last Post: 02-07-2011, 05:00 AM
  3. port forwarding wl-160
    By dj_daniyal@hotmail.c in forum Networking & Security
    Replies: 1
    Last Post: 22-12-2010, 04:41 AM
  4. Port Forwarding on Mac OS X
    By TalinF in forum Networking & Security
    Replies: 9
    Last Post: 25-06-2010, 07:12 AM
  5. Port forwarding
    By Rover in forum Networking & Security
    Replies: 7
    Last Post: 15-10-2008, 07:15 PM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Page generated in 1,679,339,576.55335 seconds with 17 queries