Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: Gaetan on December 08, 2013, 11:46:25 PM

Title: VPN PPTP IP ADDRESS
Post by: Gaetan on December 08, 2013, 11:46:25 PM
Hi,
Is it possible to specify the range of IP addresses allocated for PPTP VPN connection though SME ?
I have tried the following topic without any luck. Does not seem to work with SME 8.
Any ideas ?

http://forums.contribs.org/index.php/topic,24340.msg97421.html#msg97421

Thanks
Title: Re: VPN PPTP IP ADDRESS
Post by: janet on December 09, 2013, 02:20:33 AM
Gaetan

You can set specific IP's for individual connections using a db command.
I cannot quickly locate the command, so do a search.
Title: Re: VPN PPTP IP ADDRESS
Post by: janet on December 09, 2013, 02:33:43 AM
Gaetan

Quote
I have tried the following topic without any luck. Does not seem to work with SME 8.
http://forums.contribs.org/index.php/topic,24340.msg97421.html#msg97421

I found this post which seems to confirm the approach works with sme7.3, therefore I would assume it would still work with sme8, the basic underlying fundamentals of sme server are similar between versions.
http://forums.contribs.org/index.php/topic,39277.msg196789.html#msg196789

You should post here your template code and the exact steps (commands) you use.
Someone here can check your work.
It's best to post the exact commands you use from the server history, copy & past via Putty, rather than typing in again or copying them from your notes or from the forum thread, as copying & pasting the actual commands used, covers the possibility of transfer errors, or errors you may make when typing in the commands (ie we will see them right or wrong).
Title: Re: VPN PPTP IP ADDRESS
Post by: mmccarn on December 09, 2013, 03:51:02 PM
According to man pptpd.conf, you can set a value for 'remoteip' in /etc/pptpd.conf to control the IPs distributed to VPN clients.

According to /etc/e-smith/templates/etc/pptpd.conf/remoteip you can set db variables to control what goes into /etc/pptpd.conf.

From looking at the template fragment, I think you can set the remoteip start and end addresses using:
config setprop pptpd start a.b.c.x
config setprop pptpd end a.b.c.y


(If I'm right, you'll see your range of IPs reflected in /etc/pptpd.conf after 'remoteip')
Title: Re: VPN PPTP IP ADDRESS (SOLVED)
Post by: Gaetan on December 09, 2013, 10:56:52 PM
Hi,
Thanks for your help.
I managed to get it to work mixing various suggestions:

Steps:
1.  Choose the IPs that you want.
2.  Make the custom template fragments:
mkdir -p /etc/e-smith/templates-custom/etc/pptpd.conf
3.  Create the template fragment needed:
touch /etc/e-smith/templates-custom/etc/pptpd.conf/remoteip
4.  Save the file and expand the template:
    /sbin/e-smith/expand-template /etc/pptp.conf
5. config setprop pptpd start 192.168.1.115
6. config setprop pptpd end 192.168.1.119
7.  Test the VPN by making a connection and check your IP.


Cool !
Thanks.
Title: Re: VPN PPTP IP ADDRESS
Post by: CharlieBrady on December 10, 2013, 04:35:07 PM
Is it possible to specify the range of IP addresses allocated for PPTP VPN connection though SME ?

Only indirectly. The range of addresses for VPN is subtracted from the range of DHCP addresses. So you change the range by adjusting the number of PPTP sessions or by changing the DHCP range.

Why do you wish to specify the range of IP addresses - what problem are you trying to solve?
Title: Re: VPN PPTP IP ADDRESS
Post by: Gaetan on December 16, 2013, 01:50:03 PM
Hi,
I am running w Windows 2008 DC + DHCP on my lan.
This current DHCP scope is from 192.168.1.120 to 192.168.1.233.
I have setup manual IP addresses outside this scope.
I have disabled DHCP on the SME box.
For some reason, when connecting through VPN, SME is giving an IP address already manually assigned to your local computer (i.e:192.168.1.248)... So I end up having a local computer + the remote one using the same IP address.

This is why I would like to be able to change the SME VPN IP address scope to 192.168.1.115-119 (not used at all on my lan).
Title: Re: VPN PPTP IP ADDRESS
Post by: Boris on December 16, 2013, 07:20:03 PM

For some reason, when connecting through VPN, SME is giving an IP address already manually assigned to your local computer (i.e:192.168.1.248)... So I end up having a local computer + the remote one using the same IP address.
Isn't it easier to assign different IP to this computer with static IP address?
Title: Re: VPN PPTP IP ADDRESS
Post by: CharlieBrady on December 16, 2013, 07:44:36 PM
This is why I would like to be able to change the SME VPN IP address scope to 192.168.1.115-119 (not used at all on my lan).

In the SME server console menu, enable DHCP, with that range, then disable it again. PPTP will then use that range of addresses.
Title: Re: VPN PPTP IP ADDRESS
Post by: TerryF on December 17, 2013, 12:59:57 AM
In the SME server console menu, enable DHCP, with that range, then disable it again. PPTP will then use that range of addresses.

Charlie, does this carry forward through reboots, updates etc..sounds like a good tip to put in the wiki, or is it already there?
Title: Re: VPN PPTP IP ADDRESS
Post by: janet on December 17, 2013, 01:15:57 AM
Charlie, does this carry forward through reboots, updates etc..sounds like a good tip to put in the wiki, or is it already there?

I know I'm not Charlie, but I would say it does "stick". It's a residual setting.
Neat practical tip to remember though.

How does that saying go:
"It's not what the tool can do, but how you use it that counts", or similar.
Title: Re: VPN PPTP IP ADDRESS
Post by: TerryF on December 17, 2013, 01:18:09 AM
I know I'm not Charlie, but I would say it does "stick". It's a residual setting.
Neat practical tip to remember though.

How does that saying go:
"It's not what the tool can do, but how you use it that counts", or similar.

or from an old tradesman, NEVER blame the tool :-) thanks Janet seems like a good tip to mention in an approrpiate place in the wiki