Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2004 04:16:06 -0500
From:      Jay Hall <jhall@vandaliamo.net>
To:        freebsd-net@freebsd.org
Subject:   Assigning a specific IP address and Interface with MPD
Message-ID:  <40878D56.9030300@vandaliamo.net>

next in thread | raw e-mail | index | archive | help
I have setup a VPN for the company I work for in which all of the remote 
offices connect to the Headquarters office using MPD.  And this works 
great until I have to re-establish the connections.

What I am trying to do, and maybe there is a better way, is to control 
what ng interface a client connects on so mpd can add routes for me 
based on the set iface route statement.

For example in my mpd.conf configuration file on the server I have the lines

pptp0:
	.....
	new -i ng0 pptp0 pptp0
	set ipcp 10.129.10.40/32 10.129.10.100/32
	set iface route 10.128.10.0/24
	...

pptp1:
	......
	new -i ng1 pptp1 pptp1
	set ipcp 10.129.10.40/32 10.129.10.101/32
	set iface route 10.129.10.0/24
	.....

On the client side (all are identical with the exception of the first 
ipcp address)
	........
	new -i ng0 vpn vpn
	set ipcp 10.129.10.100/32 10.129.10.40/32
	set iface route 10.129.10.0/24
	.........

In mpd.secret on the server I have (usernames and passwords have been 
changed)

user1	"user1"	10.129.10.100
user2	"user2:	10.129.10.101

I am seeing the correct IP addresses assigned as each user logs in, but 
they are not on the interface I would expect them to be on.

Is it possible to do this?  Or should I work on trying to add the routes 
as the interfaces come up based on the IP address they are assigned?

Thanks in advance for your assistance.


Jay



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?40878D56.9030300>