IP Forwarding - Networking

This is a discussion on IP Forwarding - Networking ; Hi, I want to forward an IP to another IP in RHEL 4 Linux. So, i have two IPs like 192.168.16.1 - 192.168.0.1 and i want to forward 192.168.16.1 to 192.168.0.1. So it is not just port forwarding, i want ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: IP Forwarding

  1. IP Forwarding

    Hi,

    I want to forward an IP to another IP in RHEL 4 Linux. So, i have two
    IPs like 192.168.16.1 - 192.168.0.1 and i want to forward 192.168.16.1
    to 192.168.0.1. So it is not just port forwarding, i want to forward
    every port as well..

    So if i enter to my browser 192.168.16.1 or 192.168.16.1:443 it will
    be 192.168.0.1 or 192.168.0.1:443.

    Is there any document for that? How can i do it?

    Thanks,

    Beyza Cansever


  2. Re: IP Forwarding

    Sure....

    The answer is VirtualHost!

    Search the net for setting up a virtualhost with linux and Iptables.

    Iptables will do it clear and perfect!

    Beyza wrote:
    > Hi,
    >
    > I want to forward an IP to another IP in RHEL 4 Linux. So, i have two
    > IPs like 192.168.16.1 - 192.168.0.1 and i want to forward 192.168.16.1
    > to 192.168.0.1. So it is not just port forwarding, i want to forward
    > every port as well..
    >
    > So if i enter to my browser 192.168.16.1 or 192.168.16.1:443 it will
    > be 192.168.0.1 or 192.168.0.1:443.
    >
    > Is there any document for that? How can i do it?
    >
    > Thanks,
    >
    > Beyza Cansever



  3. Re: IP Forwarding

    On May 1, 9:14 pm, Beyza wrote:
    > Hi,
    >
    > I want to forward an IP to another IP in RHEL 4 Linux. So, i have two
    > IPs like 192.168.16.1 - 192.168.0.1 and i want to forward 192.168.16.1
    > to 192.168.0.1. So it is not just port forwarding, i want to forward
    > every port as well..
    >
    > So if i enter to my browser 192.168.16.1 or 192.168.16.1:443 it will
    > be 192.168.0.1 or 192.168.0.1:443.
    >
    > Is there any document for that? How can i do it?
    >
    > Thanks,
    >
    > Beyza Cansever


    First, you have to turn on IP Forwarding
    http://systemnotesorg.blogspot.com/2...ardarding.html


    Then you probably want to set up some firewall rules.

    I'm not sure what you are trying to accomplish, but if you want to
    allow one network to access another network, you can set up forward
    rules based on the interfaces (eth0 and eth1), rather than IPs.
    iptables -A FORWARD -i eth1 -j ACCEPT
    iptables -A FORWARD -o eth1 -j ACCEPT

    Then set up masquerading to let internal machines (on eth1 network)
    out to the network on eth0
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    This doc explains it pretty well.
    https://www.redhat.com/docs/manuals/...l-ipt-fwd.html


+ Reply to Thread