Koozali.org: home of the SME Server

VPN: DHCP assigning IP that is in use

Matthias Redl

VPN: DHCP assigning IP that is in use
« on: December 14, 2001, 06:52:23 PM »
Hi.

I finally managed to connect to my SME Server 5 using VPN from the internal network. Since TCP/IP is configured to get an ip through DHCP for the VPN connection, I sometimes receive 192.168.139.249

This IP however is also used by the network printer, which does not use DHCP but has as static IP. Therefor I configured a host named "printer" in the server manager with this IP address and the printer's mac address, hoping that SME's DHCP would stop assigning this address to the VPN connection. But it still does, which means that while a VPN client is connected having this very IP address, both the printer and this client have severe network troubles!

Any ideas what to do (except changing the printer's IP).

Thanks,
Matthias

Johan

Re: VPN: DHCP assigning IP that is in use
« Reply #1 on: December 16, 2001, 02:58:30 AM »
Hello, Matthias

This is a mistake in you config off you DHCP range.

When you give a item on you network a static IP then you must exclude this in you DHCP configuration.

I always use the first 25 ip's for static device's like server, router's switches and printer's. The rest of that subnet may used by DHCP

So go to the main console en change your DHCP range


Grtz a good luck

Johan

Tony P.

Re: VPN: DHCP assigning IP that is in use
« Reply #2 on: December 16, 2001, 04:39:58 AM »
I have the same issue but SME is not the DHCP provider. My DHCP server is only set to give out 10.x.x.50 - 99.
When I PPTP into SME I get 10.x.x.250 for an IP address. This address is excluded from my scope. I have even create a test network and the same thing happens. If SME passed DHCP to the true DHCP server I don't think I would have this problem.
As I was writing this my gut told  me I could create a custom remoteip file that would include the IP's that I want PPTP to serve so I went on a mission. So I paused the reply until I got it to work.

Here is the short version of what I did to get it to work for me. Perhaps it will work for you also.


Created a new custom template directory for pptpd.conf
   mkdir -p /etc/e-smith/templates-custom/etc/pptpd.conf

Created remoteip file with "remoteip 10.x.x.150" in the body. (IP I want PPTP to provide this could be 10.x.x.150-160 if I wanted 10 PPTP connections.)

Expanded the template
 /sbin/e-smith/expand-template /etc/pptpd.conf

Because I am a newbie I rebooted the server. I am sure I could have stopped and started a process to get this to work but I did not know which one and I did not want to mess around with it all night.