One, the IP attribution database to export the required address segment listSecond, installation IpsetThird, establish access whitelistIpset Create Access Hash:netIv. Importing IP addressesUse Strict;open INPUT, "Output.txt" and while (V. Setting iptables rulesIptables-a input-m set--match-set access src-p UDP--destination-port 53-j acceptiptables-a input-p UDP--destinati On-port 53-j DROPThis article is from "Ruyi Spirit Pro" blog, please be sure to keep this source http://417722381.blog.51cto.
I have been troubled by this problem for at least two weeks. I have repeatedly reviewed a lot of information and can finally complete the configuration today. Now I'm so excited to write it down.
Requirement: I want to test ipp2p traffic control, so I need to build a test environment within the company. Build a dual-nic Linux machine between my network and my company. The specific hardware architecture dia
Red Hat Linux 7.3 kernel 2.4.18. The eth0 of the server is bound to the external address eth0:192.168.1.3,eth1 bind the internal address eth1:1 172.17.1.1,eth1:2 172.18.1.1,eth1:3 172.19.1.1.
Now to achieve the function is the entire export limit in the 512kbit (upload traffic), 172.17 network download traffic to download to 512Kbit, 172.18 network Segments limi
The script for viewing Nic traffic in Linux (modified perfectly)
Fixed the problem where a negative number is displayed.Added bits/s statisticsAdded the final average sum.#! /Bin/bash# Osdba 2008.10.22 monitor the interface's network traffic.# Zeuslion 2009.08.29.If [$ #-ne 3]; thenEcho useage: $0 interface interval countEcho example: $0 eth0 2 10ExitFiEth = $1C
According to many documents of TC, I have also compiled a configuration record. In actual use, the effect is good. I would like to share it with you for your reference.Environment: the local area network is not large enough to support more than 40 machines. Nat Internet sharing (Intranet: eth0 Internet: eth2)CBQ uses the idle time of hardware to calculate the queue. The hardware is different and the effect is different. It is better to use htb for a large network. The following methods can be us
Linux host network traffic monitoring ifstatIfstat is used in this monitoring program. Installation Method reference:Http://man.linuxde.net/ifstat1. DownloadHttp://gael.roualland.free.fr/ifstat/ (Official Website) wget http://gael.roualland.free.fr/ifstat/ifstat-1.1.tar.gzFrom: http://man.linuxde.net/ifstatYou can also download the file in a browser and use secureCRT to upload the file;2. InstallationTar -x
) {
Shutdown (sock, Shut_rdwr);
sock =-1;
}
}
This program first initiates a socket connection to a normal HTTP server (BAIDU,QQ,163,CSDN), and when the socket is connected, it obtains the local address of the connection binding via Getsocketname, and obtains the source port number through that address.Terminal 1: Compiling and running$ g++ Source_port.cpp$./a.out www.baidu.comConnect to www.baidu.com success.Local port:39702Terminal 2: Verification via tcpdump capture package$ sudo tcp
Article Title: Linux server site traffic limit solution. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
#! /Bin/sh
# Simple bandwidth limiter-
# Change this to your link bandwidth
1 command line Input directly: Iptraf (if not, install with yum install Iptraf)2. Open Enter to select IP image.3. Select the interface for the monitoring test, all interfaces.4. Turn on the listening status log and the system default log path. /var/log/iptraf/ip_traffic.log4. After running, turn on the monitor network card traffic5.iptraf Reference Usage:Man Iptraf ViewThere are also many tool commands to view:Watch command:Watch-n 1 "/sbin/ifconfig eth0 | grep bytes ".Other answers1, Iptraf to
Nload is a simple and easy-to-use bandwidth flow monitoring tool under Linux, and dynamic graphics based on character interface display the current traffic of the NIC.
However, CentOS official source does not have it, can not directly use Yum installation. We can download the third party RPM release platform and recommend the following source, which releases multiple RPM packages
http://pkgs.repoforge.org
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.