成人片黄网站色大片免费,黑人与人妻无码中字视频,久久国产精品免费一区 360doc--just_person的文章 http://www.bczicp.cn/rssperson/168576.aspx 360doc (http://www.bczicp.cn) zh-cn 360doc--個人圖書館 iptables智能DNS http://www.bczicp.cn/content/19/0924/15/168576_862945380.shtml 2019/9/24 15:34:58
iptables智能DNS.在PREROUTING鏈中添加目的地址轉(zhuǎn)換規(guī)則:iptables -t nat -I PREROUTING -i eth0 -p tcp --dpor 53 -j DNAT --to-destination202.96.134.130.在POSTROUTING鏈中添加源地址轉(zhuǎn)換規(guī)則:iptables -t nat -I POSTROUTING -o eth1 -s 192.168.52.0/24 -p tcp --dpor 53 -jSNAT --to-source 202.96.134.10:40000-50000
Android網(wǎng)絡(luò)安全:Netfilter與iptables http://www.bczicp.cn/content/19/0920/10/168576_862127970.shtml 2019/9/20 10:00:35
Android網(wǎng)絡(luò)安全:Netfilter與iptables.ip_output.c (kernel\net\ipv4)ip_forward.c (kernel\net\ipv4)1、鳥哥的Linux私房菜服務(wù)器架設(shè)篇(第三版)——第九章、防火墻與 NAT 服務(wù)器2、https://www.netfilter.org/3、iptables使用文檔:https://www.frozentux.net/iptables-tutorial/iptables-tutorial.html 4、系列: (一)洞悉linux下的Netfilter&iptables:什么是Netfilter?
iptc library HOWTO http://www.bczicp.cn/content/19/0919/20/168576_862044416.shtml 2019/9/19 20:43:48
|<---struct ipt_entry--->|<---struct ipt_entry_match + struct ipt/xt_someModule---> (can presence many times)|<---struct ipt_entry_target + struct ipt/xt_someTarget--->(only one)|struct ipt_entry * e;unsigned int size_ipt_entry, size_ipt_entry_match, size_ipt_entry_target, size_ipt_tcp, size_rateinfo, size_physdevinfo, total_length;size_ipt_entry_match = IPT_ALIGN(sizeof(struct ipt_entry_match));
Linux下設(shè)置最大文件打開數(shù)nofile及nr http://www.bczicp.cn/content/19/0919/19/168576_862033094.shtml 2019/9/19 19:39:35
[root@server-mysql fs]# echo 1000000 > /proc/sys/fs/nr_open[root@server-mysql fs]# cat /proc/sys/fs/nr_open1000000[root@server-mysql fs]# ulimit -n 999999[root@server-mysql fs]# ulimit -n 1000000[root@server-mysql fs]# ulimit -n 1000001-bash: ulimit: open files: cannot modify limit: Operation not permitted.[root@server-mysql fs]# cat file-nr2496 0 132022[root@server-mysql fs]# cat file-max132022.
Iptables防火墻規(guī)則使用梳理 http://www.bczicp.cn/content/19/0918/12/168576_861753559.shtml 2019/9/18 12:03:39
Iptables防火墻規(guī)則使用梳理。[root@kvm-server conf]# iptables -t nat -A PREROUTING -p tcp -m tcp --dport 33066 -j DNAT --to-destination 192.168.1.161:3306[root@kvm-server conf]# iptables -t nat -A POSTROUTING -d 192.168.1.161/32 -p tcp -m tcp --sport 3306 -j SNAT --to-source 192.168.1.7[root@kvm-server conf]# iptables -t filter -A INPUT -p tcp -m state --state NEW -m tcp --dport 33066 -j ACCEPT.
libevent中的事件機(jī)制 http://www.bczicp.cn/content/19/0918/11/168576_861748063.shtml 2019/9/18 11:33:51
ev->ev_timeout為事件觸發(fā)時間點82 evutil_timeradd(&now, tv, &ev->ev_timeout);83 84 event_debug((85 "event_add: timeout in %ld seconds, call %p",86 tv->tv_sec, ev->ev_callback));87 //加入定時隊列88 event_queue_insert(base, ev, EVLIST_TIMEOUT);89 }90 91 return (res);92 }5.event_base_loop.
linux網(wǎng)橋淺析 http://www.bczicp.cn/content/19/0917/16/168576_861595154.shtml 2019/9/17 16:08:46
如下圖:主機(jī)A發(fā)送的報文被送到交換機(jī)S1的eth0口,由于eth0與eth1、eth2橋接在一起,故而報文被復(fù)制到eth1和eth2,并且發(fā)送出去,然后被主機(jī)B和交換機(jī)S2接收到。br_dev_xmit(skb, dev);交換機(jī)S2的eth2口收到報文,并將其轉(zhuǎn)發(fā)到eth0、eth1、eth3,并且記錄下“主機(jī)C由eth2接入”。交換機(jī)S1在其eth2和eth3口都會收到報文,eth2口收到的報文又會從eth3口(及其他口)轉(zhuǎn)發(fā)出去、eth3口收到的報文也會從eth2口(及其他口)轉(zhuǎn)發(fā)出去。
理解 Linux 網(wǎng)絡(luò)棧(1):Linux 網(wǎng)絡(luò)協(xié)議棧簡單總結(jié) http://www.bczicp.cn/content/19/0917/15/168576_861589608.shtml 2019/9/17 15:44:50
IP 層的入口函數(shù)在 ip_rcv 函數(shù)。它首先會調(diào)用 ip_route_input 來更新路由,然后查找 route,決定該 package 將會被發(fā)到本機(jī)還是會被轉(zhuǎn)發(fā)還是丟棄:如果是發(fā)到本機(jī)的話,調(diào)用 ip_local_deliver 函數(shù),可能會做 de-fragment(合并多個 IP packet),然后調(diào)用 ip_local_deliver 函數(shù)。1.2.3 傳輸層 (TCP/UDP)傳輸層 TCP 處理入口在 tcp_v4_rcv 函數(shù)(位于 linux/net/ipv4/tcp ipv4.c 文件中),它會做 TCP header 檢查等處理。
Linux TPROXY http://www.bczicp.cn/content/19/0912/09/168576_860542213.shtml 2019/9/12 9:41:38
TPROXY target checks whether there is an established socket for the incoming skb (using the tcp 4-tuples in the skb to search the established sockets), if there is a such socket and the socket has set IP_TRANSPARENT, it sets the fwmark for the skb and associates the skb with the socket and return NF_ACCEPT. If no established socket found, it looks for listening socket using laddr and lport.
netlink 套接字 http://www.bczicp.cn/content/19/0910/09/168576_860163193.shtml 2019/9/10 9:47:19
netlink 套接字。// libnetlink.c 頭文件中rtnl_open_byproto函數(shù)// 成功返回0, 失敗返回-1int rtnl_open_byproto(struct rtnl_handle *rth, unsigned int subscriptions, int protocol){ socklen_t addr_len; int sndbuf = 32768; int one = 1;   // 第一步:初值 memset(rth, 0, sizeof(*rth)); // 第二上:填充rth結(jié)構(gòu) rth->proto = protocol; // 協(xié)議為NETLINK_ROUTE.netlink消息頭部 include/uapi/linux/netlink.h.
記錄一次配置unix網(wǎng)絡(luò)編程環(huán)境的過程和遇到的問題 http://www.bczicp.cn/content/19/0909/14/168576_860021415.shtml 2019/9/9 14:45:28
ss-Linux unpv13e # cp config.h /usr/local/includess-Linux unpv13e # cp lib/unp.h /usr/local/includess-Linux unpv13e # sudo cp libunp.a /usr/local/libss-Linux unpv13e # cd intro.ss-Linux intro # ./daytimetcpcli 127.0.0.1connect error: Connection refused.ss-Linux intro # gcc daytimetcpcli.c -o 獲取時間 -lunpss-Linux intro # ./獲取時間 127.0.0.114 AUG 2016 08:20:15 CST.
[na]計算機(jī)網(wǎng)絡(luò)性能指標(biāo)(延遲/吞吐量/RTT等) http://www.bczicp.cn/content/19/0830/11/168576_858017139.shtml 2019/8/30 11:08:57
若忽略處理時間和發(fā)送確認(rèn)分組時間,則該信道的利用率為( )0.0566解釋:首先知道傳遞的數(shù)據(jù)時1200bit.   接下來計算有數(shù)據(jù)通過的時間,其中把速率的單位化成b/ms的形式,1Mb=1024Kb=1024*1024b=1048576b,1s=1000ms,所以1Mb/s=1048576/1000(b/ms)=1048.576b/ms,取近似1000b/ms   有數(shù)據(jù)通過的時間=1200/1000=1.2ms   利用率=1.2/(20+1.2)=0.0566.
Linux Netlink通信機(jī)制詳解(上) http://www.bczicp.cn/content/19/0829/16/168576_857782339.shtml 2019/8/29 16:43:47
#define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len))在af_netlink.c文件中我們可以看到netlink協(xié)議的注冊static struct proto netlink_proto = { .name = "NETLINK", .owner = THIS_MODULE, .obj_size = sizeof(struct netlink_sock),};在static int__init netlink_proto_init(void)函數(shù)中會調(diào)用注冊協(xié)議的函數(shù),對netlink協(xié)議進(jìn)行注冊,其中,netlink_proto就是上面的struct proto netlink_proto協(xié)議。
linux netlink通信機(jī)制 http://www.bczicp.cn/content/19/0828/19/168576_857614080.shtml 2019/8/28 19:36:35
Netlink 是一種特殊的 socket,它是 Linux 所特有的,類似于 BSD 中的AF_ROUTE 但又遠(yuǎn)比它的功能強大,目前在Linux 內(nèi)核中 使用netlink 進(jìn)行應(yīng)用與內(nèi)核通信的應(yīng)用很多; 包括:路由 daemon(NETLINK_ROUTE),用戶態(tài) socket 協(xié)議(NETLINK_USERSOCK), 防火墻(NETLINK_FIREWALL),netfilter 子系統(tǒng)(NETLINK_NETFILTER),內(nèi)核事件向用戶態(tài)通知(NETLINK_KOBJECT_UEVENT), 通用 netlink(NETLINK_GENERIC)等。
linux 獲取網(wǎng)絡(luò)狀態(tài)信息(Rtnetlink) http://www.bczicp.cn/content/19/0828/19/168576_857612990.shtml 2019/8/28 19:29:49
attr = RTA_NEXT(attr, len)) { 30 if (attr->rta_type <= max) { 31 tb[attr->rta_type] = attr;46 parse_rtattr(tb, RTA_MAX, RTM_RTA(rt), len);= NULL) { 49 inet_ntop(rt->rtm_family, RTA_DATA(tb[RTA_DST]), tmp, sizeof(tmp));= NULL) { 53 inet_ntop(rt->rtm_family, RTA_DATA(tb[RTA_SRC]), tmp, sizeof(tmp));= NULL) { 57 inet_ntop(rt->rtm_family, RTA_DATA(tb[RTA_GATEWAY]), tmp, sizeof(tmp));
L2TPv3 概述 | CCIE 工程師社區(qū) http://www.bczicp.cn/content/19/0828/11/168576_857531750.shtml 2019/8/28 11:45:52
L2TPv3 概述 | CCIE 工程師社區(qū)1、L2TP 協(xié)議之前的版本:3、L2TP 的會話:L2TPv3 的會話。5、L2TPv3 的報頭結(jié)構(gòu):L2TPv3的數(shù)據(jù)包報頭結(jié)構(gòu)。8、L2TPv3 數(shù)據(jù)會話建立過程:L2TPv3 數(shù)據(jù)會話建立過程。9、L2TPv3 維護(hù)機(jī)制:L2TPv3 維護(hù)機(jī)制。10、L2TPv3 鏈路拆除(Teardown):L2TPv3 鏈路拆除(Teardown)11、L2TPv3 的配置:L2TPv3 的配置方式有兩種。12、L2TPv3 的動態(tài)會話配置步驟:L2TPv3 的動態(tài)會話配置步驟。
Linux下ip route、ip rule、iptables的關(guān)系 http://www.bczicp.cn/content/19/0827/18/168576_857412402.shtml 2019/8/27 18:59:50
主機(jī)路由:機(jī)路由是路由選擇表中指向單個IP地址或主機(jī)名的路由記錄。首先要在網(wǎng)關(guān)服務(wù)器上添加一個默認(rèn)路由,當(dāng)然這個指向是絕大多數(shù)的IP的出口網(wǎng)關(guān):ip route add default gw 20.0.0.1之后通過 ip route 添加一個路由表:ip route add table 3 via 10.0.0.1 dev ethX (ethx 是 10.0.0.1 所在的網(wǎng)卡, 3 是路由表的編號)之后添加 ip rule 規(guī)則:ip rule add fwmark 3 table 3 (fwmark 3 是標(biāo)記,table 3 是路由表3 上邊。
理解 OpenStack 高可用(HA)(3):Neutron 分布式虛擬路由(Neutron Distributed Virtual Routing) http://www.bczicp.cn/content/19/0827/18/168576_857412269.shtml 2019/8/27 18:58:59
ip route list table table_numberip route list table table_name.首先要在網(wǎng)關(guān)服務(wù)器上添加一個默認(rèn)路由,當(dāng)然這個指向是絕大多數(shù)的IP的出口網(wǎng)關(guān):ip route add default gw 20.0.0.1之后通過 ip route 添加一個路由表:ip route add table 3 via 10.0.0.1 dev ethX (ethx 是 10.0.0.1 所在的網(wǎng)卡, 3 是路由表的編號)之后添加 ip rule 規(guī)則:ip rule add fwmark 3 table 3 (fwmark 3 是標(biāo)記,table 3 是路由表3 上邊。
L2tp協(xié)議簡單解析 http://www.bczicp.cn/content/19/0827/10/168576_857308080.shtml 2019/8/27 10:07:35
3)LNS(L2TP Network Server,L2TP 網(wǎng)絡(luò)服務(wù)器) LNS 既是PPP端系統(tǒng),又是L2TP 協(xié)議的服務(wù)器端,通常作為一個企業(yè)內(nèi)部網(wǎng)的邊緣設(shè)備。在LNS側(cè),收到L2TP/VPN的IP報文后將IP、UDP、L2TP報文頭去掉后就恢復(fù)了用戶的PPP報文,將PPP報文頭去掉就可以得到IP報文,至此用戶IP數(shù)據(jù)報文得到,從而實現(xiàn)用戶ip數(shù)據(jù)的透明隧道傳輸,而且整個PPP報頭/報文在傳遞的過程中也保持未變,這也驗證了L2TP是一個二層VPN隧道協(xié)議!
Linux UML 內(nèi)核調(diào)試方法 http://www.bczicp.cn/content/19/0820/12/168576_856021653.shtml 2019/8/20 12:51:07
Linux UML 內(nèi)核調(diào)試方法。在Host Linux和UML根文件系統(tǒng)之間傳遞文件,最簡單的方式就是使用掛載UML根文件系統(tǒng)到Host Linux中的目錄,然后使用cp??截怘ost Linux中源碼根目錄下mods中的文件到UML根文件系統(tǒng)中:#cp –R /opt/um/linux-3.10.57/mods/lib/modules/3.10.57 /mnt/lib/modules.在 編譯好的/opt/um/linux-3.10.57 根目錄下,執(zhí)行Linux運行。root@liuyw-OptiPlex-9010:/opt/um/linux-3.10.57# ps -el|grep linux.