Networking Forums

Networking Forums > Computer Networking > Linux Networking > Different dhcpd.conf options for the same networks

Reply
Thread Tools Display Modes

Different dhcpd.conf options for the same networks

 
 
Diesis
Guest
Posts: n/a

 
      09-07-2004, 03:53 PM
Hello,

QUICK:
how do assign options to remote vpn clients that request ip address
differently from local lan clients even if they share the same subnet ?

LONG:
I have configured an host with OpenVPN in bridged mode.
Here I have:
eth0, internal, bridged with br0
eth1, external, connected to the Nat router.

On this machine runs (don't blame me) dhcpd that (please don't blame me
anymore) give leases to the internal Lan clients, and, because it must
listen on br0, to the 'remote lan' clients.

Problem: local Lan pc's must have as default gateway br0's ip address to
surf the Internet, that is:
option routers a.b.c.d;
Naturally this couldn't be right for the VPN clients,because they will
have a different gateway already assigned, but now they receive the same
configurations.

I have thought to build a 'known clients' pool for the lan with the
gateway option, and an 'unknown clients' pool for the vpn clients
without the gateway option.

Is there another solution based on the fact that dhcp request for the
vpn clients doesn't come from the internal lan ?


I hope I've been clear enough

-- Diesis
 
Reply With Quote
 
 
 
 
James Knott
Guest
Posts: n/a

 
      09-07-2004, 08:12 PM
Diesis wrote:

> Problem: local Lan pc's must have as default gateway br0's ip address to
> surf the Internet, that is:
> option routers a.b.c.d;
> Naturally this couldn't be right for the VPN clients,because they will
> have a different gateway already assigned, but now they receive the same
> configurations.


Sure it can. When you run openvpn, a net route is added, pointing to the
lan, where it can now find the default gateway. If not, just add the
appropriate route command to the vpn script.

--

(This space intentionally left blank)
 
Reply With Quote
 
Diesis
Guest
Posts: n/a

 
      09-07-2004, 10:11 PM
James Knott wrote:

> Sure it can. When you run openvpn, a net route is added, pointing to the
> lan, where it can now find the default gateway. If not, just add the
> appropriate route command to the vpn script.


Ok, let me explain again:

Now, via openvpn, the remote client gets all routes correctly, but dhcp
adds this route (that is corrected for lan clients, but not for vpn):

0.0.0.0 0.0.0.0 a.b.c.d
#network #netmask #gw

On the windoze client I need to manually enter
C:\> route delete 0.0.0.0 a.b.c.d.
to clear this added default route, and use the real default route to
surf the Internet and reach my 'remote' host.

Options are:
a) Let openvpn _delete_ this erroneous route on the vpn client (windoze)
b) Let dhcp distinguish between local and remote client and don't send
default gw option to them (seen a patch for this on the isc website, but
this harms me....)

How do I do one of this ?

--
Diesis
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      09-07-2004, 10:34 PM
Diesis wrote:

> James Knott wrote:
>
>> Sure it can. When you run openvpn, a net route is added, pointing to the
>> lan, where it can now find the default gateway. If not, just add the
>> appropriate route command to the vpn script.

>
> Ok, let me explain again:
>
> Now, via openvpn, the remote client gets all routes correctly, but dhcp
> adds this route (that is corrected for lan clients, but not for vpn):
>
> 0.0.0.0 0.0.0.0 a.b.c.d
> #network #netmask #gw
>
> On the windoze client I need to manually enter
> C:\> route delete 0.0.0.0 a.b.c.d.
> to clear this added default route, and use the real default route to
> surf the Internet and reach my 'remote' host.
>
> Options are:
> a) Let openvpn _delete_ this erroneous route on the vpn client (windoze)
> b) Let dhcp distinguish between local and remote client and don't send
> default gw option to them (seen a patch for this on the isc website, but
> this harms me....)
>
> How do I do one of this ?
>


Assuming you followed the how-to, you have a "home.up" script, that you run
to start the vpn. Place any route commands in there, or what ever script
you use to start the vpn.

man route for details on adding and removing routes



--

(This space intentionally left blank)
 
Reply With Quote
 
Diesis
Guest
Posts: n/a

 
      09-08-2004, 09:28 AM
James Knott wrote:

> Assuming you followed the how-to, you have a "home.up" script, that you run
> to start the vpn. Place any route commands in there, or what ever script
> you use to start the vpn.
> man route for details on adding and removing routes


The erroneous route is on the windoze machine.
I dunno (I'm a 2 day old user of OpenVPN...) of a route statement in
..ovpn windows config files that could _delete_ routes neither a way to
automatically launch batch files after connecting (Dos prompt windows
are not good looking for my 'management_class' users...).
In the meantime I've found on this document
(http://openvpn.sourceforge.net/INSTALL-win32.html) a reference to a
trick for dhcpd.conf by Dave Lau that is based on the fact that TAP
virtual network card has the MAC address starting with 00:FF:xx:xx:xx:xx.
I think this is enough for me.

--
Diesis
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      09-08-2004, 01:47 PM
Diesis wrote:

> The erroneous route is on the windoze machine.
> I dunno (I'm a 2 day old user of OpenVPN...)


Well, this is a Linux group. I haven't come across that problem in Windows,
because I don't use Windows. However, there are commands in Windows as
well for controlling routes.


--

(This space intentionally left blank)
 
Reply With Quote
 
Diesis
Guest
Posts: n/a

 
      09-08-2004, 06:24 PM
James Knott wrote:

> Well, this is a Linux group.


Yo, sure !
The initial question was about isc dhcpd, it wasn't ?


--
Diesis
 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      09-08-2004, 08:14 PM
Diesis wrote:

> James Knott wrote:
>
>> Well, this is a Linux group.

>
> Yo, sure !
> The initial question was about isc dhcpd, it wasn't ?
>
>


That's what I thought, but apparently the OP is talking about Windows.

--

(This space intentionally left blank)
 
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
dhcpd.conf setup pechoi@syr.edu Linux Networking 0 04-12-2006 11:21 PM
dhcpd.conf Damir Galič Linux Networking 6 08-30-2005 04:42 PM
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
passing multiple params to modules via dhcpd.conf Kevin Valentine Linux Networking 5 12-13-2004 07:58 PM
dhcpd.conf - multiple routers Dan Johnson Linux Networking 7 07-23-2004 06:22 PM



1 2 3 4 5 6 7 8 9 10 11