OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of xseman »
  • Show Posts »
  • Topics
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

  • Messages
  • Topics
  • Attachments

Topics - xseman

Pages: [1]
1
17.7 Legacy Series / Captive Portal - Allowed MAC addresses problem
« on: September 21, 2017, 09:15:39 am »
Hello,

I have problems on client side if MAC addres is in allowed addreses, any download will be dropped in 2-3 seconds, this doesn't happen for clients that aren't in allowed list. Any tips?

Thanks!

2
17.7 Legacy Series / Hostname of clinets PC [solved]
« on: September 17, 2017, 04:12:01 pm »
Hello friends,

is is possible to output hostnames of connected PCs in LAN to terminal?
if i use 'arp -a' instead of hostname of client i get '?'.

Thanks!

3
17.7 Legacy Series / Restart dhcpd server from shell [SOLVED]
« on: August 12, 2017, 11:40:53 pm »
Hello,

Is it possible to restart dhcpd server via shell?
I've tried 'service dhcpd restart' but got this error:

dhcpd does not exist in /etc/rc.d or the local startup
directories (/usr/local/etc/rc.d), or is not executable
------------------------------------------------------------
edit:
so i foud out, all I need is to kill dhcpd process and start dhcpd again.

Code: [Select]
ps -A | grep /usr/local/sbin/dhcpd
kill 'PID'
/usr/local/sbin/dhcpd -user dhcpd -group dhcpd -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid

But still after restart, dhcp don't get new addresses from edited conf.xml.

Ok so after some digging in '/usr/local/etc/rc.initial' i found this php code that will restart dhcpd server.

Code: [Select]
#!/usr/local/bin/php
<?phprequire_once("config.inc");require_once("interfaces.inc");require_once("filter.inc");require_once("auth.inc");require_once('rrd.inc');require_once("util.inc");require_once("system.inc");require_once("services.inc");require_once("interfaces.inc");if (count($argv) > 1 && is_numeric($argv[1])) {    // starting delayed.    sleep($argv[1]);}services_dhcpd_configure('all', array(), true);

And then just run it

Code: [Select]
php 'code.php'

Pages: [1]
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2