Koozali.org: home of the SME Server

openvpn pptp dhcpd problem

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
openvpn pptp dhcpd problem
« on: December 16, 2008, 09:15:39 PM »
A server-and-gateway installation frequently has dhcp problem breaking lan access to workstations.

This is with smeserver-openvpn-bridge-fws-1.1-2.noarch.rpm

The symptoms are:
* dhcpd
Not configured to listen on any interfaces!

* pptp
GRE: read(fd=7,buffer=8056600,len=8260) from network failed: status = -1 error = Protocol not available

With openvpn, the InternalInterface Name must be br0
Code: [Select]
db configuration getprop InternalInterface Name
Faced with these problems I did:
Code: [Select]
yum remove pptpd e-smith-pptpd
yum install pptpd e-smith-pptpd

and discovered that InternalInterface was set back to eth0 instead of br0.

Does someone experienced this behaviour?
Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: openvpn pptp dhcpd affa problem?
« Reply #1 on: December 16, 2008, 10:13:10 PM »
Following up...

pptp problem might also be linked to affa.
When a client tries to connect during an affa scheduled job, this error occurs:

Dec 16 16:00:08 serveur /sbin/e-smith/affa[25061]:.../users2affa: ...|valid|yes
Dec 16 16:01:35 serveur pptpd[25149]: CTRL: Client 192.197.166.31 control connection started
Dec 16 16:01:35 serveur pptpd[25149]: CTRL: Starting call (launching pppd, opening GRE)
Dec 16 16:01:35 serveur pppd[25150]: Plugin radius.so loaded.
Dec 16 16:01:35 serveur pppd[25150]: RADIUS plugin initialized.
Dec 16 16:01:35 serveur pppd[25150]: pppd 2.4.4 started by root, uid 0
Dec 16 16:01:35 serveur kernel: divert: not allocating divert_blk for non-ethernet device ppp0
Dec 16 16:01:35 serveur pppd[25150]: Using interface ppp0
Dec 16 16:01:35 serveur pppd[25150]: Connect: ppp0 <--> /dev/pts/2
Dec 16 16:01:35 serveur pptpd[25149]: GRE: read(fd=7,buffer=8056600,len=8260) from network failed: status = -1 error = Protocol not available
Dec 16 16:01:35 serveur pptpd[25149]: CTRL: GRE read or PTY write failed (gre,pty)=(7,6)
Dec 16 16:01:35 serveur pptpd[25149]: CTRL: Reaping child PPP[25150]
Dec 16 16:01:35 serveur pppd[25150]: Modem hangup
Dec 16 16:01:35 serveur pppd[25150]: Connection terminated.
Dec 16 16:01:35 serveur kernel: divert: no divert_blk to free, ppp0 not ethernet
Dec 16 16:01:35 serveur pppd[25150]: Exit.
Sophie from Montréal

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: openvpn pptp dhcpd problem
« Reply #2 on: December 17, 2008, 09:27:03 AM »
Hi. It took me a while to track this problem. It occures in general each time you run a yum command. In fact, the script /etc/e-smith/events/actions/initialize-default-database will reset the name of the InternalInterface to eth0 (or eth1), and this script is allways called after yum.
I'm finishing a total rewrite of this contrib, I'll soone annonce it. Waiting for it, you can correct this problem with this:

Code: [Select]
vim /etc/e-smith/db/configuration/migrate/26openvpn-fix-internal-interface
And put this code :

Code: [Select]
{
        use esmith::util;

        my $vpn = $DB->get('openvpn-bridge');
        my $status = $vpn->prop('status') || 'disabled';
        my $bridge_name = $vpn->prop('brIf');
        my $internal = $DB->get('InternalInterface');
        my $internal_name = $internal->prop('Name');
        if (($bridge_name eq $internal_name) || ($status eq 'disabled')){
                return
        }

        $internal->merge_props('Name',$bridge_name);

}

This will fix the problem waiting for the new version.

Cheers
C'est la fin du monde !!! :lol:

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: openvpn pptp dhcpd problem
« Reply #3 on: December 17, 2008, 03:05:02 PM »
To add extra info:
I have this contrib installed on 6 servers and problems occur only on the one running the dhcp server.
Sophie from Montréal

Offline soprom

  • *
  • 589
  • +0/-0
    • www.logiciel-libre.org
Re: openvpn pptp dhcpd problem
« Reply #4 on: January 07, 2009, 03:26:13 PM »
Quote
GRE: read(fd=7,buffer=8056600,len=8260) from network failed: status = -1 error = Protocol not available

This was solved by recreating a new connection on the client side.
Sophie from Montréal