Re: Help With MPD as pptp client -- SOLVED

2010-05-26 Thread Drew Tomlinson

On 5/25/2010 11:02 AM, Drew Tomlinson wrote:
I'm trying to use mpd5 as a client to connect to a VPN server at work 
which has a routeable class B IP address.  It's a Cisco 3000 and 
Windows machines connect using the built-in Microsoft dialup 
networking client.


I can successfully connect with mpd5 and after manually manipulating 
the routing tables, I can connect to machines through the vpn.  But I 
can't understand how to configure mpd5 so that manual route 
intervention is not required.


Here is my mpd.conf which is based from the sample included with the 
port.  I have used aaa.bbb.x.x to represent my employer's IP addresses.


# $Id: mpd.conf.sample,v 1.46 2009/04/29 11:04:17 amotin Exp $
#
#

startup:
# configure mpd users
set user foo bar admin
set user foo1 bar1
# configure the console
set console self 127.0.0.1 5005
set console open
# configure the web server
set web self 0.0.0.0 5006
set web open

#
# Default configuration is dialup

default:
load pptp_client

pptp_client:
#
# PPTP client: only outgoing calls, auto reconnect,
# ipcp-negotiated address, one-sided authentication,
# default route points on ISP's end
#

create bundle static B1
#   set iface route default
set iface idle 0
set iface route aaa.bbb.0.0/16
set ipcp ranges 0.0.0.0/0 0.0.0.0/0

create link static L1 pptp
set link action bundle B1
set auth authname **
set auth password **
set link max-redial 0
set link mtu 1460
set link keep-alive 20 75
set pptp peer aaa.bbb.18.10
set pptp disable windowing
open

Here is my route table after starting mpd5:

vm# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif 
Expire

default192.168.1.2UGS 9  3097494em0
127.0.0.1  link#6 UH  056291lo0
aaa.bbb.0.0/16 aaa.bbb.18.10  UGS 00ng0
aaa.bbb.18.10  link#8 UH  02ng0
aaa.bbb.206.150link#8 UHS 00lo0
192.168.1.0/24 link#2 U   2 12822383em0

I need my route table to look like this (or something equivalent):

vm# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif 
Expire

default192.168.1.2UGS12  3099541em0
127.0.0.1  link#6 UH  056299lo0
aaa.bbb.0.0/16 aaa.bbb.18.10  UGS 0   12ng0
aaa.bbb.18.10  192.168.1.2UGHS3   77em0
aaa.bbb.206.150link#8 UHS 00lo0
192.168.1.0/24 link#2 U   1 12822495em0


You'll see the main difference is that I have to route aaa.bbb.18.10 
out the default gateway of my LAN.


What do I need to change or add in my mpd.conf to get the desired 
routing table?


For the archives:

I was able to accomplish manipulation of the routing tables with 
scripts.  See 'set iface up-script' in mpd5 docs for more info.


HTH someone.

Cheers,

Drew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Help With MPD as pptp client

2010-05-25 Thread Drew Tomlinson
I'm trying to use mpd5 as a client to connect to a VPN server at work 
which has a routeable class B IP address.  It's a Cisco 3000 and Windows 
machines connect using the built-in Microsoft dialup networking client.


I can successfully connect with mpd5 and after manually manipulating the 
routing tables, I can connect to machines through the vpn.  But I can't 
understand how to configure mpd5 so that manual route intervention is 
not required.


Here is my mpd.conf which is based from the sample included with the 
port.  I have used aaa.bbb.x.x to represent my employer's IP addresses.


# $Id: mpd.conf.sample,v 1.46 2009/04/29 11:04:17 amotin Exp $
#
#

startup:
# configure mpd users
set user foo bar admin
set user foo1 bar1
# configure the console
set console self 127.0.0.1 5005
set console open
# configure the web server
set web self 0.0.0.0 5006
set web open

#
# Default configuration is dialup

default:
load pptp_client

pptp_client:
#
# PPTP client: only outgoing calls, auto reconnect,
# ipcp-negotiated address, one-sided authentication,
# default route points on ISP's end
#

create bundle static B1
#   set iface route default
set iface idle 0
set iface route aaa.bbb.0.0/16
set ipcp ranges 0.0.0.0/0 0.0.0.0/0

create link static L1 pptp
set link action bundle B1
set auth authname **
set auth password **
set link max-redial 0
set link mtu 1460
set link keep-alive 20 75
set pptp peer aaa.bbb.18.10
set pptp disable windowing
open

Here is my route table after starting mpd5:

vm# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
default192.168.1.2UGS 9  3097494em0
127.0.0.1  link#6 UH  056291lo0
aaa.bbb.0.0/16 aaa.bbb.18.10  UGS 00ng0
aaa.bbb.18.10  link#8 UH  02ng0
aaa.bbb.206.150link#8 UHS 00lo0
192.168.1.0/24 link#2 U   2 12822383em0

I need my route table to look like this (or something equivalent):

vm# netstat -rn
Routing tables

Internet:
DestinationGatewayFlagsRefs  Use  Netif Expire
default192.168.1.2UGS12  3099541em0
127.0.0.1  link#6 UH  056299lo0
aaa.bbb.0.0/16 aaa.bbb.18.10  UGS 0   12ng0
aaa.bbb.18.10  192.168.1.2UGHS3   77em0
aaa.bbb.206.150link#8 UHS 00lo0
192.168.1.0/24 link#2 U   1 12822495em0


You'll see the main difference is that I have to route aaa.bbb.18.10 out 
the default gateway of my LAN.


What do I need to change or add in my mpd.conf to get the desired 
routing table?


Thanks,

Drew
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Help With MPD as pptp client

2010-05-25 Thread Drew Tomlinson

On 5/25/2010 11:59 AM, Mark wrote:


--- On Tue, 5/25/10, Drew Tomlinsond...@mykitchentable.net  wrote:

   

From: Drew Tomlinsond...@mykitchentable.net
Subject: Help With MPD as pptp client
To: freebsd-questions@freebsd.org
Date: Tuesday, May 25, 2010, 1:02 PM
I'm trying to use mpd5 as a client to
connect to a VPN server at work which has a routeable class
B IP address.  It's a Cisco 3000 and Windows machines
connect using the built-in Microsoft dialup networking
client.

I can successfully connect with mpd5 and after manually
manipulating the routing tables, I can connect to machines
through the vpn.  But I can't understand how to
configure mpd5 so that manual route intervention is not
required.

Here is my mpd.conf which is based from the sample included
with the port.  I have used aaa.bbb.x.x to represent
my employer's IP addresses.

# $Id: mpd.conf.sample,v 1.46 2009/04/29 11:04:17 amotin
Exp $
#
#

startup:
 # configure mpd users
 set user foo bar admin
 set user foo1 bar1
 # configure the console
 set console self 127.0.0.1
5005
 set console open
 # configure the web server
 set web self 0.0.0.0 5006
 set web open

#
# Default configuration is dialup

default:
 load pptp_client

pptp_client:
#
# PPTP client: only outgoing calls, auto reconnect,
# ipcp-negotiated address, one-sided authentication,
# default route points on ISP's end
#

 create bundle static B1
#   set iface route default
 set iface idle 0
 set iface route aaa.bbb.0.0/16
 set ipcp ranges 0.0.0.0/0
0.0.0.0/0

 create link static L1 pptp
 set link action bundle B1
 set auth authname **
 set auth password **
 set link max-redial 0
 set link mtu 1460
 set link keep-alive 20 75
 set pptp peer aaa.bbb.18.10
 set pptp disable windowing
 open

Here is my route table after starting mpd5:

vm# netstat -rn
Routing tables

Internet:
DestinationGateway   
 FlagsRefs 
 Use  Netif Expire
default   
192.168.1.2UGS   
  9  3097494em0
127.0.0.1  link#6 
UH 
 056291 
   lo0
aaa.bbb.0.0/16 aaa.bbb.18.10 
 UGS 
00 
   ng0
aaa.bbb.18.10  link#8   
  UH   
   02 
   ng0
aaa.bbb.206.150link#8 
UHS 
00 
   lo0
192.168.1.0/24 link#2   
  U 
  2 12822383em0


I need my route table to look like this (or something
equivalent):

vm# netstat -rn
Routing tables

Internet:
DestinationGateway   
 FlagsRefs 
 Use  Netif Expire
default   
192.168.1.2UGS   
 12  3099541em0
127.0.0.1  link#6 
UH 
 056299 
   lo0
aaa.bbb.0.0/16 aaa.bbb.18.10 
 UGS 
0   12 
   ng0
aaa.bbb.18.10  192.168.1.2   
 UGHS3   
77em0
aaa.bbb.206.150link#8 
UHS 
00 
   lo0
192.168.1.0/24 link#2   
  U 
  1 12822495em0



You'll see the main difference is that I have to route
aaa.bbb.18.10 out the default gateway of my LAN.

What do I need to change or add in my mpd.conf to get the
desired routing table?

Thanks,

Drew
___
freebsd-questions@freebsd.org
mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

 

Comment out   set iface route aaa.bbb.0.0/16 and see if it works. I use mpd 
without this setting, it routes it to the default without a setting.
HTH
   


Yeah, thanks for your reply but that line creates this entry:

aaa.bbb.0.0/16 aaa.bbb.18.10

which I do need.  Basically I somehow need to say route all 
aaa.bbb.0.0/16 except aaa.bbb.18.10.  I don't know how to accomplish this.


The good news is that after my manual fixes, the tunnel works.

Cheers,

Drew


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org