[pfSense] ISC-DHCP server not matching partial of the MAC address

2015-10-29 Thread Mustafa Karci
Hi all,

Let me explain a bit off the situation I have at the moment. The idea witch
was working properly under a CentOS environment. We have different  types
of IP phones, YEALINK , AASTRA, SNOM and so on in ore company.

To provision all these different phones we were using substring (hardware)
match on the first 6 digits of the MAC address.

Now days we are working with the PfSense and it is also or DHCP server.
When I do a option 66 text http://xxx.xxx.xxx.xxx/ps/snom/cfg, I only will
get the write provisioning for all or SNOM Phones. So no auto provisioning
for the other types off IP PHONES.

So there for I made Additional Pools in ore DHCP server.

Pool Description YEALINK
range: xxx.xxx.128.1 - xxx.xxx.128.10
MAC Address Control: 00:15:65
TFTP server: http://xxx.xxx.xxx.xxx./ps/yealink/cfg/

Pool Description AASTRA
range: xxx.xxx.128.11 - xxx.xxx.128.19
MAC Address Control: 00:15:65
TFTP server: http://xxx.xxx.xxx.xxx./ps/aastra/cfg/

So did a factory reset on the YEALINK PHONE and this will not get a ip
address for the pool that I created. It will get a ip address outside the
pool. And this will go to option 66 and tring to get a snom firmware.

Did read this articel but with no use.
https://redmine.pfsense.org/issues/2241

here is the out put off the dhcpd.conf

class "001565" {
match if substring (hardware, 1, 3) = 00:15:65;
}
class "00085D" {
match if substring (hardware, 1, 3) = 00:08:5D;
}
subnet xxx.xxx.128.0 netmask 255.255.252.0 {
pool {
option domain-name-servers xxx..131.254;
ddns-update-style interim;
range xxx..128.20 xxx.xxx.129.254;
}

pool {
option domain-name-servers xxx.xxx.131.254;
allow members of "001565";
option tftp-server-name "
http://xxx.xxx.xxx.xxx/ps/yealink/cfg/;;
range xxx.xxx.128.1 xxx.xxx.128.10;
}

pool {
option domain-name-servers xxx.xxx.131.254;
allow members of "00085D";
option tftp-server-name "
http://xxx.xxx.xxx.xxx//ps/aastra/cfg;;
range xxx.xxx.128.11 xxx.xxx.128.19;

The manual says ass following http://linux.die.net/man/5/dhcpd.conf
So tried with quotes, but no luck

class "my-clients" {
  match if substring (hardware,1,8) = "00:1D:92" ;
}
pool {
  range 192.168.165.10 192.168.165.20;
  allow members of  "my-clients" ;
}

When I add the mac address to the "DHCP Static Mapping" The mac address
will get the write provisioning.

MAC ADDRESS: 00:15:65:2a:08:36
CLIENT identifier: TEST
TFTP Server: http://xxx.xxx.xxx.xxx/ps/yealink/cfg/

Im reading in the Pfsense manual that maching partial of the MAC address is
possible. So why is the pool not working for me?

here the output off tcpdump -vvv -i em1 port bootpc

15:10:53.867289 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
UDP (17), length 576)
0.0.0.0.bootpc > 255.255.255.255.bootps: [udp sum ok] BOOTP/DHCP,
Request from 00:15:65:2a:08:36 (oui Unknown), length 548, xid 0xab36593e,
secs 100, Flags [none] (0x)
  Client-Ethernet-Address 00:15:65:2a:08:36 (oui Unknown)
  Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 00:15:65:2a:08:36
T125 Option 125, length 37:
0.0.13.233.32.1.6.48.48.49.53.54.53.2.12.48.48.49.53.54.53.50.97.48.56.51.54.3.8.83.73.80.45.84.50.50.80
MSZ Option 57, length 2: 576
Parameter-Request Option 55, length 17:
  Subnet-Mask, Time-Zone, Default-Gateway, Time-Server
  Domain-Name-Server, LOG, Hostname, Domain-Name
  BR, NTP, TFTP, BF
  Vendor-Option, Option 132, Option 133, Option 120
  Lease-Time
Hostname Option 12, length 8: "SIP-T22P"
Vendor-Class Option 60, length 7: "yealink"
END Option 255, length 0
PAD Option 0, length 0, occurs 214
15:10:54.879881 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto
UDP (17), length 333)
pfSense.ipgroup.bootps > 10.254.129.106.bootpc: [udp sum ok]
BOOTP/DHCP, Reply, length 305, xid 0xab36593e, secs 100, Flags [none]
(0x)
  Your-IP xxx.xxx.129.106
  Server-IP bla.bla.local
  Client-Ethernet-Address 00:15:65:2a:08:36 (oui Unknown)
  file "/pxelinux.0"
  Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Offer
Server-ID Option 54, length 4: pfSense.test
Lease-Time Option 51, length 4: 86400
Subnet-Mask Option 1, length 4: 255.255.252.0
Default-Gateway Option 3, length 4: pfSense.test
Domain-Name-Server Option 6, length 4: pfSense.test
Domain-Name Option 15, length 13: "ipgroup.test"
Vendor-Option Option 43, length 14:
49.48.46.50.53.52.46.49.51.49.46.49.51.50
END Option 255, length 0
15:10:54.926611 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto
UDP (17), length 576)

15:10:54.926611 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none], proto

Re: [pfSense] Please support, pdo and mysqli extensions of php on pfsense new release

2015-10-29 Thread Chris Buechler
On Wed, Oct 28, 2015 at 6:35 PM, Ceylan BOZOĞULLARINDAN
 wrote:
> Hello,
>
> I am working for three days on add pdo_mysql and mysqli extensions on
> pfsense 2.2.4 php. But i didn't. I need to connect database with using
> mysqli or pdo instead of mysql. Let me explain to you what i have tried;
>
> When you run "pkg search mysqli" command, you see this result;
>
> php5-mysqli-5.4.45 The mysqli shared extension for php
> php55-mysqli-5.5.30The mysqli shared extension for php
> php56-mysqli-5.6.14The mysqli shared extension for php
>
> After that, if you attend to install one of these packets, you will
> encourage some requirements;
>
>
> New packages to be INSTALLED:
> php5-mysqli: 5.4.45
> php5: 5.4.45
>
> But if i install these requirements, i will see the error like this;
>
>
> Warning: Illegal string offset 'alias' in /etc/inc/util.inc on line 1401
>
>
> The problem is clear; how can i install or enable pdo_mysql or mysqli
> extensions of php on pfsense 2.2.4 or others (it doesn't matter) ?

You can't pkg install anything PHP-related.
https://doc.pfsense.org/index.php/How_do_I_get_PHP_support_for_mysql,_sqlite,_sockets,_etc
___
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold

Re: [pfSense] Please support, pdo and mysqli extensions of php on pfsense new release

2015-10-29 Thread Ceylan BOZOĞULLARINDAN
Thank you for your response,

If a module is needed that is not included nor activated, a copy of the
module may be obtained from an equivalent version FreeBSD system using a
matching PHP version. Drop it into the correct lib directory, and activate
it with dynamodules. This is a lot riskier, and may be prone to break in
various ways, thus is it not supported nor recommended.

I understood the case but could you please help me? I am using pfsense
2.2.4 and i need mysqli or pdo_mysql extensions. This is important for me.

Thanks a lot..

2015-10-29 18:32 GMT+02:00 Chris Buechler :

> On Wed, Oct 28, 2015 at 6:35 PM, Ceylan BOZOĞULLARINDAN
>  wrote:
> > Hello,
> >
> > I am working for three days on add pdo_mysql and mysqli extensions on
> > pfsense 2.2.4 php. But i didn't. I need to connect database with using
> > mysqli or pdo instead of mysql. Let me explain to you what i have tried;
> >
> > When you run "pkg search mysqli" command, you see this result;
> >
> > php5-mysqli-5.4.45 The mysqli shared extension for php
> > php55-mysqli-5.5.30The mysqli shared extension for php
> > php56-mysqli-5.6.14The mysqli shared extension for php
> >
> > After that, if you attend to install one of these packets, you will
> > encourage some requirements;
> >
> >
> > New packages to be INSTALLED:
> > php5-mysqli: 5.4.45
> > php5: 5.4.45
> >
> > But if i install these requirements, i will see the error like this;
> >
> >
> > Warning: Illegal string offset 'alias' in /etc/inc/util.inc on line 1401
> >
> >
> > The problem is clear; how can i install or enable pdo_mysql or mysqli
> > extensions of php on pfsense 2.2.4 or others (it doesn't matter) ?
>
> You can't pkg install anything PHP-related.
>
> https://doc.pfsense.org/index.php/How_do_I_get_PHP_support_for_mysql,_sqlite,_sockets,_etc
> ___
> pfSense mailing list
> https://lists.pfsense.org/mailman/listinfo/list
> Support the project with Gold! https://pfsense.org/gold
___
pfSense mailing list
https://lists.pfsense.org/mailman/listinfo/list
Support the project with Gold! https://pfsense.org/gold