route,iptables,/proc/net,netstat,ifconfig,ip,vconfig

本文详细介绍了Linux网络管理中常用的几个命令,包括route的路由设置(如-j, -A, -F等选项),iptables的包过滤与NAT管理,/proc/net下的网络状态查看,netstat用于显示网络连接、路由表等信息,ifconfig用于配置网络接口及硬件地址,以及ip和vconfig在创建子接口与虚拟IP方面的应用。通过对这些命令的深入理解,可以更好地管理和维护Linux网络环境。" 116431051,9945396,MATLAB实现人脸五官定位:最大类间方差法,"['图像处理', 'MATLAB', '人脸识别', '图像识别', '算法']
摘要由CSDN通过智能技术生成

一、route


-j  即jump

-A 即append

-F 刷新,-N新建,-X删除   链操作

-D删除



Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
172.25.126.0    *               255.255.255.192 U     0      0        0 vmnet1
135.252.170.0   *               255.255.255.0   U     0      0        0 eth0
135.252.162.0   *               255.255.255.0   U     0      0        0 eth1
169.254.0.0     *               255.255.0.0     U     0      0        0 eth1
default         Bj107306-apac-L 0.0.0.0         UG    0      0        0 eth0


route -A inet6 -n
Kernel IPv6 routing table
Destination                                 Next Hop                                Flags Metric Ref    Use Iface
2001:da8:8003:801::/64                      ::                                      U     256    1        0 eth0    
fe80::/64                                   ::                                      U     256    0        0 eth0    
::/0                                        2001:da8:8003:801::1                    UG    1      0        0 eth0    
::1/128                                     ::                                      U     0      124       1 lo      
2001:da8:8003:801:202:120:1:2/128           ::                                      U     0      0        1 lo      
fe80::20c:29ff:fe0f:aa40/128                ::                                      U     0      0        1 lo      
ff00::/8                                    ::                                      U     256    0        0 eth2    
ff00::/8                                    ::                                      U     256    0        0 eth0 


route add -net 1.2.3.4 netmask 255.255.255.0 gw eth0

route add -net 1.2.3.4 netmask 255.255.255.0 dev eth0

route del -net 1.2.3.4 netmask 255.255.255.0 dev eth0

route add -host 1.2.3.4 dev eth0


二、iptables - administration tool for IPv4 packet filtering and NAT

Iptables  is  used  to  set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.  Several different tables may be defined.
       Each table contains a number of built-in chains and may also contain user-defined chains.
Each chain is a list of rules which can match a set of packets.  Each rule specifies what to do with a packet that matches.  This is called  a  'target',
       which may be a jump to a user-defined chain in the same table.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值