首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    实现 Linux 系统防火墙(包过滤、状态防火墙、NAT)

    最大的难点在于内核驱动的编写,在此之前我也没有做过Linux内核模块的代码编写,所以刚开始做起来非常吃力,这要求代码编写者有非常好的C语言基础,能非常熟练地应用C语言的结构体、指针、函数指针及内存动态申请和释放等。 最困难的一点就是Bug的排查太过于困难了。每次编译运行的时候都提心吊胆,害怕跑起来哪里出错了,一旦出错,比如解引用了空指针或者没有及时释放分配的内存导致内存泄漏,动辄就会导致内核程序崩溃,只能重新启动虚拟机(重启虚拟机太浪费时间了),因为是内核程序,所以内核崩溃故障的定位和排查也不容易(到现在这个程序其实还不太稳定)。

    01

    hostapd 配置「建议收藏」

    hostapd is an IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator. This page is dedicated to the Linux documentation of it’s implementation and use. Please refer to the hostapd home page for information for other Operating Systems. As far a Linux is concerned, out of the old drivers you can only use these 3 drivers with hostapd: HostAP madwifi prism54 All new mac80211 based drivers that implement AP functionality are supported with hostapd’s nl80211 driver. The mac80211 subsystem moves all aspects of master mode into user space. It depends on hostapd to handle authenticating clients, setting encryption keys, establishing key rotation policy, and other aspects of the wireless infrastructure. Due to this, the old method of issuing ‘ iwconfig <wireless interface> mode master’ no longer works. Userspace programs like hostapd now use netlink (the nl80211 driver) to create a master mode interface for your traffic and a monitor mode interface for receiving and transmitting management frames. Getting hostapd Using your distributions hostapd It is advisable to try your distributions version of hostapd before taking the time to compile and install your own copy. This will make future maintenance easier as you’ll be able to use the init scripts shipped by the distro and hostapd will be updated by it as well. If your distribution ships 0.6.8 or later, you can test with this bare minimum config by creating the file hostapd-minimal.conf: #change wlan0 to your wireless device interface=wlan0 driver=nl80211 ssid=test channel=1 If that config errors out with something like: hostapd $ sudo hostapd ./hostapd-minimal.conf Configuration file: ./hostapd-minimal.conf Line 2: invalid/unknown driver ‘nl80211’ 1 errors found in configuration file ‘./hostapd-minimal.conf’ that means that your distro is not shipping hostapd with nl80211 driver support and you’ll need to follow the building instructions that follow. If it works, you can skip down to the configuring hostapd secti

    02
    领券