Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 534
专题 - bluetooth蓝牙技术
广告

可选:点击以支持我们的网站

免费文章

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbjdownloads/cbjdownloads.php on line 49

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbblogs/cbblogs.php on line 48

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/components/com_comprofiler/plugin/user/plug_cbarticles/cbarticles.php on line 47

专题

monograph:special feature on education


Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 57

近年来,随着智能家居行业的发展和产品的扩散,越来越多的消费者开始考虑如何在现代家居中获得“解放感”,感受智能家居带来的完美体验。而智能灯控因其具有方便、美观、安全、节能、性价比高的优点成为越来越多消费者家装的新选择。普林芯驰一直以来深耕于智能家居领域,特别是在智能灯控上具备丰富的客户案例以及多元化的芯片系统解决方案,为上下游广大客户实现从硬件到场景应用的一站式赋能,低门槛、高性价比的解决方案。


Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 156

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 57

AI万能遥控器:方案介绍篇 

   尽管AI语音经过了多年发展,产品经过了多轮迭代,却仍然没有真正满足广大消费者和行业下游从业者对产品的核心诉求:产品使用足够便捷,无需APP下载、安装、登录等一系列繁琐的操作,真正达到“即插即用”;功耗极低,可以长时间电池供电,解决在特殊和紧急情况下续电不够的尴尬;低价成本,能够以实惠的价格享受到优质的用户体验;方案开发简单、成熟,甚至是达到拿到完整方案打板贴片生产,就可以直接出货。无论是广大消费者,还是行业下游从业者,目前都期待AI语音能够带来真正的“质”的改变,提供新的“芯”元素。


Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 156

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 57

sudo su
sudo apt-get install iptables-persistent
modprobe ip_tables #启动iptable
 
#删除原有iptables规则
iptables -F
iptables -X
 
#抛弃所有不符合三种链规则的数据包
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -P FORWARD DROP
 
#设置:本地进程 lo  的 INPUT 和 OUTPUT 链接
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -jACCEPT
iptables -A INPUT -m state --state NEW,INVALID -j LOG
iptables -A OUTPUT -o lo -j ACCEPT
 
#打开 ssh 端口 控制 出和入
iptables -A INPUT  -p TCP  --dport 22 -j ACCEPT
iptables -A OUTPUT -p TCP --sport 22 --dport 1024:65535 -j ACCEPT

#打开 http端口 控制 出和入
iptables -A INPUT  -p TCP  --dport 80 -j ACCEPT
iptables -A OUTPUT -p TCP --sport 80 --dport 1024:65535 -j ACCEPT
#开出的端口,严格控制出入
#--------------------------------
 
#保存配置  存储位置/etc/iptables/iptables-persistent 会在开机启动时自动load之前的iptables设置
#iptables-persisten是bash脚本,位置在/etc/
service iptables-persistent save
 
--------------------------------------------------
2.关闭iptables
sudo su
iptables -F
iptables -X
iptables -Z
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
modprobe -r ip_tables

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 156

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 57

封单个IP的命令是:
iptables -I INPUT -s 211.1.0.0 -j DROP

封IP段的命令是:
iptables -I INPUT -s 211.1.0.0/16 -j DROP
iptables -I INPUT -s 211.2.0.0/16 -j DROP
iptables -I INPUT -s 211.3.0.0/16 -j DROP

封整个段的命令是:
iptables -I INPUT -s 211.0.0.0/8 -j DROP

封几个段的命令是:
iptables -I INPUT -s 61.37.80.0/24 -j DROP
iptables -I INPUT -s 61.37.81.0/24 -j DROP

想在服务器启动自运行的话有三个方法:
1、把它加到/etc/rc.local中
2、iptables-save >;/etc/sysconfig/iptables可以把你当前的iptables规则放到/etc/sysconfig/iptables中,系统启动iptables时自动执行。
3、service iptables save 也可以把你当前的iptables规则放/etc/sysconfig/iptables中,系统启动iptables时自动执行。
后两种更好此,一般iptables服务会在network服务之前启来,更安全。

解封的话:
iptables -D INPUT -s IP地址 -j REJECT
iptables -F 全清掉了

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 156

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 57

在Linux下,使用ipteables来维护IP规则表。要封停或者是解封IP,其实就是在IP规则表中对入站部分的规则进行添加操作。

要封停一个IP,使用下面这条命令:

iptables -I INPUT -s ***.***.***.*** -j DROP

要解封一个IP,使用下面这条命令:

 
  1. iptables -D INPUT -s ***.***.***.*** -j DROP

参数-I是表示Insert(添加),-D表示Delete(删除)。后面跟的是规则,INPUT表示入站,***.***.***.***表示要封停的IP,DROP表示放弃连接。

此外,还可以使用下面的命令来查看当前的IP规则表:

 
  1. iptables -list

比如现在要将123.44.55.66这个IP封杀,就输入:

 
  1. iptables -I INPUT -s 123.44.55.66 -j DROP

要解封则将-I换成-D即可,前提是iptables已经有这条记录。如果要想清空封掉的IP地址,可以输入:

 
  1. iptables -flush

要添加IP段到封停列表中,使用下面的命令:

 
  1. iptables -I INPUT -s 121.0.0.0/8 -j DROP

其实也就是将单个IP封停的IP部分换成了Linux的IP段表达式。关于IP段表达式网上有很多详细解说的,这里就不提了。

相信有了iptables的帮助,解决小的DDoS之类的攻击也不在话下!

附:其他常用的命令

编辑 iptables 文件

 
  1. vi /etc/sysconfig/iptables

关闭/开启/重启防火墙

 
  1. /etc/init.d/iptables stop
  2.  
  3. #start 开启
  4.  
  5. #restart 重启

验证一下是否规则都已经生效:

 
  1. iptables -L

保存并重启iptables

 
  1. /etc/rc.d/init.d/iptables save
  2. service iptables restart

linux下实用iptables封ip段的一些常见命令:

封单个IP的命令是:

 
  1. iptables -I INPUT -s 211.1.0.0 -j DROP

封IP段的命令是:

 
  1. iptables -I INPUT -s 211.1.0.0/16 -j DROP
  2. iptables -I INPUT -s 211.2.0.0/16 -j DROP
  3. iptables -I INPUT -s 211.3.0.0/16 -j DROP

封整个段的命令是:

 
  1. iptables -I INPUT -s 211.0.0.0/8 -j DROP

封几个段的命令是:

 
  1. iptables -I INPUT -s 61.37.80.0/24 -j DROP
  2. iptables -I INPUT -s 61.37.81.0/24 -j DROP

想在服务器启动自运行的话有三个方法:

1、把它加到/etc/rc.local中

2、iptables-save >;/etc/sysconfig/iptables可以把你当前的iptables规则放到/etc/sysconfig/iptables中,系统启动iptables时自动执行。

3、service iptables save 也可以把你当前的iptables规则放/etc/sysconfig/iptables中,系统启动iptables时自动执行。

后两种更好此,一般iptables服务会在network服务之前启来,更安全。

解封的话:
iptables -D INPUT -s IP地址 -j REJECT
iptables -F 全清掉了

Linux防火墙Iptable如何设置只允许某个ip访问80端口,只允许特定ip访问某端口?参考下面命令,只允许46.166.150.22访问本机的80端口。如果要设置其他ip或端口,改改即可。

 
  1. iptables -I INPUT -p TCP –dport 80 -j DROP
  2. iptables -I INPUT -s 46.166.150.22 -p TCP –dport 80 -j ACCEPT

在root用户下执行上面2行命令后,重启iptables, service iptables restart

查看iptables是否生效:

 
  1. [root@www<span< a=""> class="pun">.xxx.com]# iptables -L</span<>
  2. Chain INPUT (policy ACCEPT)
  3. target           prot opt source               destination
  4. ACCEPT     tcp  –  46.166.150.22    anywhere            tcp dpt:http
  5. DROP         tcp  –  anywhere             anywhere            tcp dpt:http
  6.  
  7. Chain FORWARD (policy ACCEPT)
  8. target     prot opt source               destination
  9.  
  10. Chain OUTPUT (policy ACCEPT)
  11. target     prot opt source               destination

上面命令是针对整个服务器(全部ip)禁止80端口,如果只是需要禁止服务器上某个ip地址的80端口,怎么办?

下面的命令是只允许来自174.140.3.190的ip访问服务器上216.99.1.216的80端口

 
  1. iptables -A FORWARD -s 174.140.3.190 -d 216.99.1.216 -p tcp -m tcp –dport 80 -j ACCEPT
  2. iptables -A FORWARD -d 216.99.1.216 -p tcp -m tcp –dport 80 -j DROP

更多iptables参考命令如下:

1.先备份iptables

 
  1. # cp /etc/sysconfig/iptables /var/tmp

需要开80端口,指定IP和局域网

下面三行的意思:

先关闭所有的80端口

开启ip段192.168.1.0/24端的80口

开启ip段211.123.16.123/24端ip段的80口

 
  1. # iptables -I INPUT -p tcp –dport 80 -j DROP
  2. # iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport 80 -j ACCEPT
  3. # iptables -I INPUT -s 211.123.16.123/24 -p tcp –dport 80 -j ACCEPT

以上是临时设置。

2.然后保存iptables

 
  1. # service iptables save

3.重启防火墙

 
  1. #service iptables restart

===============以下是转载================================================

以下是端口,先全部封再开某些的IP

 
  1. iptables -I INPUT -p tcp –dport 9889 -j DROP
  2. iptables -I INPUT -s 192.168.1.0/24 -p tcp –dport 9889 -j ACCEPT

如果用了NAT转发记得配合以下才能生效

 
  1. iptables -I FORWARD -p tcp –dport 80 -j DROP
  2. iptables -I FORWARD -s 192.168.1.0/24 -p tcp –dport 80 -j ACCEPT

常用的IPTABLES规则如下:
只能收发邮件,别的都关闭

 
  1. iptables -I Filter -m mac –mac-source 00:0F:EA:25:51:37 -j DROP
  2. iptables -I Filter -m mac –mac-source 00:0F:EA:25:51:37 -p udp –dport 53 -j ACCEPT
  3. iptables -I Filter -m mac –mac-source 00:0F:EA:25:51:37 -p tcp –dport 25 -j ACCEPT
  4. iptables -I Filter -m mac –mac-source 00:0F:EA:25:51:37 -p tcp –dport 110 -j ACCEPT

IPSEC NAT 策略

 
  1. iptables -I PFWanPriv -d 192.168.100.2 -j ACCEPT
  2. iptables -t nat -A PREROUTING -p tcp –dport 80 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.100.2:80
  3.  
  4. iptables -t nat -A PREROUTING -p tcp –dport 1723 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.100.2:1723
  5.  
  6. iptables -t nat -A PREROUTING -p udp –dport 1723 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.100.2:1723
  7.  
  8. iptables -t nat -A PREROUTING -p udp –dport 500 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.100.2:500
  9.  
  10. iptables -t nat -A PREROUTING -p udp –dport 4500 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.100.2:4500
  11.  

FTP服务器的NAT

 
  1. iptables -I PFWanPriv -p tcp –dport 21 -d 192.168.1.22 -j ACCEPT
  2. iptables -t nat -A PREROUTING -p tcp –dport 21 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.1.22:21

只允许访问指定网址

 
  1. iptables -A Filter -p udp –dport 53 -j ACCEPT
  2. iptables -A Filter -p tcp –dport 53 -j ACCEPT
  3. iptables -A Filter -d www.ctohome.com -j ACCEPT
  4. iptables -A Filter -d www.guowaivps.com -j ACCEPT
  5. iptables -A Filter -j DROP

开放一个IP的一些端口,其它都封闭

 
  1. iptables -A Filter -p tcp –dport 80 -s 192.168.1.22 -d www.pconline.com.cn -j ACCEPT
  2. iptables -A Filter -p tcp –dport 25 -s 192.168.1.22 -j ACCEPT
  3. iptables -A Filter -p tcp –dport 109 -s 192.168.1.22 -j ACCEPT
  4. iptables -A Filter -p tcp –dport 110 -s 192.168.1.22 -j ACCEPT
  5. iptables -A Filter -p tcp –dport 53 -j ACCEPT
  6. iptables -A Filter -p udp –dport 53 -j ACCEPT
  7. iptables -A Filter -j DROP

多个端口

 
  1. iptables -A Filter -p tcp -m multiport –destination-port 22,53,80,110 -s 192.168.20.3 -j REJECT

连续端口

 
  1. iptables -A Filter -p tcp -m multiport –source-port 22,53,80,110 -s 192.168.20.3 -j REJECT iptables -A Filter -p tcp –source-port 2:80 -s192.168.20.3 -j REJECT

指定时间上网

 
  1. iptables -A Filter -s 10.10.10.253 -m time –timestart 6:00 –timestop 11:00 –days Mon,Tue,Wed,Thu,Fri,Sat,Sun -j DROP
  2. iptables -A Filter -m time –timestart 12:00 –timestop 13:00 –days Mon,Tue,Wed,Thu,Fri,Sat,Sun -j ACCEPT
  3. iptables -A Filter -m time –timestart 17:30 –timestop 8:30 –days Mon,Tue,Wed,Thu,Fri,Sat,Sun -j ACCEPT

禁止多个端口服务

 
  1. iptables -A Filter -m multiport -p tcp –dport 21,23,80 -j ACCEPT

将WAN 口NAT到PC

 
  1. iptables -t nat -A PREROUTING -i $INTERNET_IF -d $INTERNET_ADDR -j DNAT –to-destination 192.168.0.1

将WAN口8000端口NAT到192。168。100。200的80端口

 
  1. iptables -t nat -A PREROUTING -p tcp –dport 8000 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.1.22:80

MAIL服务器要转的端口

 
  1. iptables -t nat -A PREROUTING -p tcp –dport 110 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.1.22:110
  2. iptables -t nat -A PREROUTING -p tcp –dport 25 -d $INTERNET_ADDR -j DNAT –to-destination 192.168.1.22:25

只允许PING 202。96。134。133,别的服务都禁止

 
  1. iptables -A Filter -p icmp -s 192.168.1.22 -d 202.96.134.133 -j ACCEPT
  2. iptables -A Filter -j DROP

禁用BT配置

 
  1. iptables –A Filter –p tcp –dport 6000:20000 –j DROP

禁用QQ防火墙配置

 
  1. iptables -A Filter -p udp –dport ! 53 -j DROP
  2. iptables -A Filter -d 218.17.209.0/24 -j DROP
  3. iptables -A Filter -d 218.18.95.0/24 -j DROP
  4. iptables -A Filter -d 219.133.40.177 -j DROP

基于MAC,只能收发邮件,其它都拒绝

 
  1. iptables -I Filter -m mac –mac-source 00:0A:EB:97:79:A1 -j DROP
  2. iptables -I Filter -m mac –mac-source 00:0A:EB:97:79:A1 -p tcp –dport 25 -j ACCEPT
  3. iptables -I Filter -m mac –mac-source 00:0A:EB:97:79:A1 -p tcp –dport 110 -j ACCEPT

禁用MSN配置

 
  1. iptables -A Filter -p udp –dport 9 -j DROP
  2. iptables -A Filter -p tcp –dport 1863 -j DROP
  3. iptables -A Filter -p tcp –dport 80 -d 207.68.178.238 -j DROP
  4. iptables -A Filter -p tcp –dport 80 -d 207.46.110.0/24 -j DROP

只允许PING 202。96。134。133 其它公网IP都不许PING

 
  1. iptables -A Filter -p icmp -s 192.168.1.22 -d 202.96.134.133 -j ACCEPT
  2. iptables -A Filter -p icmp -j DROP

禁止某个MAC地址访问internet:

 
  1. iptables -I Filter -m mac –mac-source 00:20:18:8F:72:F8 -j DROP

禁止某个IP地址的PING:

 
  1. iptables –A Filter –p icmp –s 192.168.0.1 –j DROP

禁止某个IP地址服务:

 
  1. iptables –A Filter -p tcp -s 192.168.0.1 –dport 80 -j DROP
  2. iptables –A Filter -p udp -s 192.168.0.1 –dport 53 -j DROP

只允许某些服务,其他都拒绝(2条规则)

 
  1. iptables -A Filter -p tcp -s 192.168.0.1 –dport 1000 -j ACCEPT
  2. iptables -A Filter -j DROP

禁止某个IP地址的某个端口服务

 
  1. iptables -A Filter -p tcp -s 10.10.10.253 –dport 80 -j ACCEPT
  2. iptables -A Filter -p tcp -s 10.10.10.253 –dport 80 -j DROP

禁止某个MAC地址的某个端口服务

 
  1. iptables -I Filter -p tcp -m mac –mac-source 00:20:18:8F:72:F8 –dport 80 -j DROP

禁止某个MAC地址访问internet:

 
  1. iptables -I Filter -m mac –mac-source 00:11:22:33:44:55 -j DROP

禁止某个IP地址的PING:

 
  1. iptables –A Filter –p icmp –s 192.168.0.1 –j DROP

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/html/templates/ja_allure/html/com_content/category/blog_item.php on line 156
FaLang translation system by Faboba

登陆


Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as the key parameter for array_key_exists() is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/cbPluginHandler.php on line 323

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/src/Menu/AbstractMenu.php on line 164

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 217

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 219

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 227

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 231

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 234

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 237

Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/html/libraries/CBLib/CB/Legacy/LegacyFoundationFunctions.php on line 239

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100
mysqli object is already closed (500 Whoops, looks like something went wrong.)

Error

HTTP 500 Whoops, looks like something went wrong.

mysqli object is already closed

Exception

Error

  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. */
  2. public function disconnect()
  3. {
  4. // Close the connection.
  5. if (\is_callable([$this->connection, 'close'])) {
  6. $this->connection->close();
  7. }
  8. parent::disconnect();
  9. }
  1. *
  2. * @since 2.0.0
  3. */
  4. public function __destruct()
  5. {
  6. $this->disconnect();
  7. }
  8. /**
  9. * Alter database's character set.
  10. *
DatabaseDriver->__destruct()

Stack Trace

Error
Error:
mysqli object is already closed

  at /var/www/html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318
  at mysqli->close()
     (/var/www/html/libraries/vendor/joomla/database/src/Mysqli/MysqliDriver.php:318)
  at Joomla\Database\Mysqli\MysqliDriver->disconnect()
     (/var/www/html/libraries/vendor/joomla/database/src/DatabaseDriver.php:496)
  at Joomla\Database\DatabaseDriver->__destruct()                

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100

Deprecated: Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect since PHP 8.1 in /var/www/html/plugins/system/falangdriver/falangdriver.php on line 100