linux
AF_NETLINK
network programming
Author: WhoAmI
Date: 20230522
E-mail: kccddb@gmail.com
Copyright: CC BY-NC-SA
user space 與 kernel Space 透過 Netlink Socket, getsockopt, setsockopt - get and set options on sockets 溝通, e.g., iproute2, tc, iptables, udev 等
(Linux 最好用 ip route 而不要用 route!
用 ip addr …)
偵測 斷線 也不要用 ping, 例如 PPP, PPPoE 最好透過 netlink socket.
Kernel Korner - Why and How to Use Netlink Socket, by Kevin Kaichuan He on January 5, 2005
How to use netlink socket to communicate with a kernel module?
Monitoring Linux networking state using netlink
Oleg Kutkov / February 14, 2018
iptables 是 user space 軟體用來設定網路核心的工具程式
Netflter 才是真正 Linux 網路核心部分
了解 Netflter Architecture 更能了解 Linux 網路核心的運作! 了解網路核心運作後, iptables 的使用就可靠自己練習 iptables 的用法
netfilter.org is home to the software of the packet filtering framework inside the Linux 2.4.x and later kernel series. Software commonly associated with netfilter.org is iptables.
HOWTO
https://www.netfilter.org/documentation/index.html#documentation-howto
e.g., Linux 2.4 Packet Filtering HOWTO
Ubuntu
Iptables is a firewall, installed by default on all official Ubuntu distributions (Ubuntu, Kubuntu, Xubuntu).
https://help.ubuntu.com/community/IptablesHowTo
Source NAT/Masquerading/Destination NAT
Linux 2.4 NAT HOWTO
iptables 基本使用
THE BEGINNER’S GUIDE TO IPTABLES, THE LINUX FIREWALL BY KORBIN BROWN FEBRUARY 6, 2014, 12:34PM EDT