Networking Forums

Networking Forums > Computer Networking > Linux Networking > IP Forwarding

Reply
Thread Tools Display Modes

IP Forwarding

 
 
Beyza
Guest
Posts: n/a

 
      05-02-2007, 05:14 AM
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

 
Reply With Quote
 
 
 
 
joealey2003@yahoo.com
Guest
Posts: n/a

 
      05-02-2007, 12:44 PM
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


 
Reply With Quote
 
systemnotes@gmail.com
Guest
Posts: n/a

 
      05-03-2007, 07:28 AM
On May 1, 9:14 pm, Beyza <anlamar...@gmail.com> 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 With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ip forwarding InuY4sha Linux Networking 9 01-08-2008 11:16 AM
IP forwarding without NAT balzano_1@yahoo.com Linux Networking 2 09-17-2007 08:25 AM
X forwarding over ssh -- how? Robert Latest Linux Networking 2 07-15-2005 11:53 AM
X11 Forwarding except ssh Peng Yu Linux Networking 4 06-03-2005 04:22 PM
ssh/scp forwarding ??? Ben Linux Networking 11 09-29-2004 09:51 PM



1 2 3 4 5 6 7 8 9 10 11