Find the answer to your Linux question:
Results 1 to 4 of 4
I have a problem. I have attached a picture Cisco has been set on any computer in the class 172.16/16 with default gateway 172.17.1.1 How could I give internet access ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2004
    Posts
    4

    Iptables DNAT problem


    I have a problem.
    I have attached a picture
    Cisco has been set on any computer in the class 172.16/16 with default gateway 172.17.1.1
    How could I give internet access to ip 172.16.4.1 through gateway linux2.

    Thanks in advance
    Attached Images Attached Images

  2. #2
    Just Joined!
    Join Date
    Sep 2007
    Location
    Silver Spring, MD
    Posts
    95

    Todd's Response

    iptables -I FORWARD -j accept
    iptables -I OUTPUT -j accept
    iptables -I INPUT -j accept

    iptables -t nat -A PREROUTING -d 172.16.1.1 -j DNAT --to-destination 172.17.1.3
    -------------------

    One thing, why do you have the second router (172.17.1.2), that can do the natting (from 172.16 to 172.17). I am not sure why you want the linux router to do the translation since you have multiple routers (what type of cisco router do you have).

    Let me know if there is something I am missing.

    There is a way to load balance the Linux servers, that might be a better solution but I am not sure what you are trying to do other than sending packets to another firewall (172.17.1.3).

  3. #3
    Just Joined!
    Join Date
    Feb 2004
    Posts
    4
    cisco routers are in different location.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Dec 2010
    Posts
    146
    First, I think there's a fundamental flaw. The gateway has to be in the same network as the network for it to work.

    The gateway should have an external IP too to which it will link the internal network.

Posting Permissions

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