Results 1 to 7 of 7

Thread: IPtables router specific IP internally to another internal IP

  1. #1
    Join Date
    Mar 2010
    Posts
    2,033

    IPtables router specific IP internally to another internal IP

    Please help me in this following issue. I am trying to route an Internal IP address on another internal IP address. The router which I am using is having 2 NIC's. One NIC is internal (192.168.1.xxx) and other is an external NIC (24.xxx.xxx.xxx). I know that this could be achieved by use of IPtable commands but I dont know which commands will do the trick. Therefore if anybody of you knows how to IPtables router specific IP internally to another internal IP then please share some information. Thanks in advance.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,424

    Re: IPtables router specific IP internally to another internal IP

    The routing engine which will be used has to know all the REAL addresses to complete the tasks. To know the real source of the packer during final communication, the source NAT needs to be done POST. While to know the actual destination of the packet, the destination NAT has to be done PRE. Following the steps above will help you in achieving your task using IPtables.

  3. #3
    Join Date
    May 2008
    Posts
    3,516

    Re: IPtables router specific IP internally to another internal IP

    Using the following command in the IPtables will help you route one Internal ip address on the other internal IP address.
    iptables -t nat -I PREROUTING -s webbrowser -d (destination IP) --dport 80 -j DNAT --to-destination myserver:80
    Enter the following command and see if it works. For making the command work, you will have to replace the Destination IP block with the IP which you want to re-route. Rest of the syntax and the command is same.

  4. #4
    Join Date
    Mar 2010
    Posts
    2,033

    Re: IPtables router specific IP internally to another internal IP

    As suggested I entered the command suggested by you but the command is not working. Whenever the command is entered in the IP tables, it gives and error saying "-dport is an unknown argument". I cant figure out what is causing such problem and hence need your help in solving the issue. Please help.

  5. #5
    Join Date
    May 2008
    Posts
    3,516

    Re: IPtables router specific IP internally to another internal IP

    There must be some problem with the version of the IPtables which you are using. Either the version is outdated or the version is not installed properly. There are many files associated to any of the application which is installed on the computer. If any of the file which is associated to the application is not working then the application will not work properly. Hence I would suggest that you remove the current installed version of IP tables and download latest version. Install the application and then check if the same error is achieved or not.

  6. #6
    Join Date
    Mar 2010
    Posts
    2,033

    Re: IPtables router specific IP internally to another internal IP

    Thanks for helping out, the solution really helped in routing the one internal IP address on the other internal IP address. The problem was with the version of IP tables which I was using. The version was outdated which created problems while using the application. After updating the version, now there is no issue.

  7. #7
    Join Date
    May 2008
    Posts
    3,516

    Re: IPtables router specific IP internally to another internal IP

    I am glad that the solution worked for you. I also had faced similar problems with IP tables earlier and updating the version of IPtables had worked hence I suggested you to try to update the version of IP tables. Although if there are any problems with IP tables then let us know.

Similar Threads

  1. ADSL Router, How to permit only specific MAC’s
    By 1kshana in forum Networking & Security
    Replies: 6
    Last Post: 04-09-2011, 09:41 AM
  2. VPN is working internally but not externally?
    By Jalela in forum Networking & Security
    Replies: 6
    Last Post: 20-06-2011, 10:41 PM
  3. Wi-Fi router for internal use
    By Degrader in forum Networking & Security
    Replies: 5
    Last Post: 19-01-2011, 08:05 PM
  4. Using getters & setters internally
    By Jensen Ackles in forum Software Development
    Replies: 5
    Last Post: 11-03-2010, 01:35 PM
  5. Manage properties of access internally
    By Gunner 1 in forum Software Development
    Replies: 5
    Last Post: 17-02-2010, 03:17 AM

Tags for this Thread

Bookmarks

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,714,052,757.75994 seconds with 16 queries