Networking Forums

Networking Forums > Computer Networking > Linux Networking > how to configure Gateway func between 2 ifaces, one with static IP,other with DHCP

Reply
Thread Tools Display Modes

how to configure Gateway func between 2 ifaces, one with static IP,other with DHCP

 
 
b_dutta
Guest
Posts: n/a

 
      07-29-2008, 01:56 PM
Hi,

I have a private network on 10.0.2.x network on one hand (all linux
boxes running CentOS4.6) -- all of these hosts have a single LAN card,
barring 1, called "gatekeeper" which has 2. On "gatekeeper" one of the
interfaces has the IP=10.0.2.254 (gateway for all other hosts on the
private network), and the other interface is configured for DHCP.
Also, I've setup DynDNS on this machine s.t. I could reach this
machine over the Dynamic IP from anywhere. The interface with DHCP IP,
allows it to connect to the Internet via a firewall (& http proxy
etc.). I also have a network which is also assigned a dynamic IP via
DHCP, which can connect to the internet, and also to "gatekeeper". I'd
like to know, how I could configure "gatekeeper" to act as a Gateway
for the 10.0.2.x private LAN machines, s.t. they can also be reached
from the internet (via a middle-hope on "gatekeeper") and vice-versa ?

The intended topology is available in this image-link here (http://
c.imagehost.org/0781/topo.gif)

thanks & regards,
bani
 
Reply With Quote
 
 
 
 
b_dutta
Guest
Posts: n/a

 
      07-29-2008, 02:00 PM
On Jul 29, 6:56*pm, b_dutta <banibrata.du...@gmail.com> wrote:
> Hi,
>
> I have a private network on 10.0.2.x network on one hand (all linux
> boxes running CentOS4.6) -- all of these hosts have a single LAN card,
> barring 1, called "gatekeeper" which has 2. On "gatekeeper" one of the
> interfaces has the IP=10.0.2.254 (gateway for all other hosts on the
> private network), and the other interface is configured for DHCP.
> Also, I've setup DynDNS on this machine s.t. I could reach this
> machine over the Dynamic IP from anywhere. The interface with DHCP IP,
> allows it to connect to the Internet via a firewall (& http proxy
> etc.). I also have a network which is also assigned a dynamic IP via
> DHCP, which can connect to the internet, and also to "gatekeeper". I'd
> like to know, how I could configure "gatekeeper" to act as a Gateway
> for the 10.0.2.x private LAN machines, s.t. they can also be reached
> from the internet (via a middle-hope on "gatekeeper") and vice-versa ?
>
> The intended topology is available in this image-link here (http://
> c.imagehost.org/0781/topo.gif)
>
> thanks & regards,
> bani


Forgot to add that, I only have control over (i.e. admin-privileges)
for the machines on the Private LAN (10.0.2.x) and the "gatekeeper"
machine itself. I do not have any admin-privileges over the Firewall,
DHCP server etc., as this is in an inflexible corporate network.

thanks & regards,
bani
 
Reply With Quote
 
Agryppa
Guest
Posts: n/a

 
      07-31-2008, 12:18 AM
b_dutta pisze:
> Hi,
>
> I have a private network on 10.0.2.x network on one hand (all linux
> boxes running CentOS4.6) -- all of these hosts have a single LAN card,
> barring 1, called "gatekeeper" which has 2. On "gatekeeper" one of the
> interfaces has the IP=10.0.2.254 (gateway for all other hosts on the
> private network), and the other interface is configured for DHCP.


So its IP address is alocated from a DHCPD server. You do not have
control over this process. You say so in the following post.

> Also, I've setup DynDNS on this machine s.t. I could reach this
> machine over the Dynamic IP from anywhere.

Hmm... It seems someone had set port forwarding on the firewall so that
you can use at least port 80 to access your gatekeeper. Thank him for
that. Or perhaps there is no firewall there at all...?


> The interface with DHCP IP,
> allows it to connect to the Internet via a firewall (& http proxy
> etc.).

Nothing unusual. It is a default route taken from th DHCPD server that
tells the gatekeeper about the right path to the Net.



> I also have a network which is also assigned a dynamic IP via
> DHCP, which can connect to the internet, and also to "gatekeeper".

Do not forget to tells us that this DHCP is YOURS, not Theirs. Theirs
sets the default route, ip, netmask, broadcast of the gatekeeper's
interfaces. That's all.


> I'd
> like to know, how I could configure "gatekeeper" to act as a Gateway
> for the 10.0.2.x private LAN machines, s.t. they can also be reached
> from the internet (via a middle-hope on "gatekeeper") and vice-versa ?

If you have a full control over the gatekeeper you should be able to
further redirect the packets destined for your 10.0.2.x network machines.
Methinks iptables and iproute2 should be of great help in this field.
You could match packets destined for specific ports coming in on an
dhcp_ip gatekeeper's interface, mark them, then route to one of your
LAN's computers.

Being more specific is beyond of my expertise, however.

Agryppa

> The intended topology is available in this image-link here (http://
> c.imagehost.org/0781/topo.gif)


Nice picture, done with DIA?
>
> thanks & regards,
> bani

 
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
How can I configure a static IP from my Linksys router? laredotornado@zipmail.com Wireless Internet 5 03-10-2007 11:54 PM
How to automatically configure the Network settings of a specific LAN card from Static IP to Obtain IP through DHCP or vice versa? Marco Windows Networking 3 08-20-2004 06:48 PM
How to automatically configure the Network settings of a specific LAN card from Static IP to Obtain IP through DHCP or vice versa? Marco Windows Networking 3 08-20-2004 06:48 PM
Windows98 Gateway will not accept static gateway Steve Windows Networking 2 09-21-2003 05:45 AM
Default Gateway Dropped after PPP LCP Configure robertys Windows Networking 0 07-29-2003 12:39 AM



1 2 3 4 5 6 7 8 9 10 11