Article title: IPv6 applications in Linux networks. 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.
Internet Protocol Version 6 is a next-generation network Protocol that replaces IPv4. it has many new features and functions. As a next-generation Internet Protocol, IPv6, which is generated and developed by the IP address crisis, has been recognized by all parties. in the future, the development of the Internet cannot be separated from IPv6 support and application. The Ipv6 and Ipv4 protocols are not similar in terms of structure or system tools. Linux supports IPv6 in all operating systems first. here we will introduce the IPv6 address, route settings, firewall configuration, and security tools in Linux, this allows you to quickly transition from IPv4 to IPv6 in a Linux network environment.
Configure Ipv6 protocol
The following describes how to deploy IPv6 in Linux using the example of Mandrake 9.1 Linux.
1. load the IPv6 module
Compared with Windows systems, Linux provides better Ipv6 support. generally, Ipv6 can be used directly in Linux versions based on the 2.4 Kernel. before using IPv6, check whether the system's Ipv6 module is loaded, if you do not have one, you can use the command to manually load it. This requires the permissions of the Super User. Then run the command to check that the IPv6 address (inet6 addr: fe80: 200: e8ff: fea0: 2586/64) is displayed on the fifth line in Figure 1 to verify that IPv6 has been loaded.
# Modprobe IPv6
# Ifconfig-
The following content is displayed:
Figure 1 shows that the IPv6 address has been loaded
2. use the Ping command to check whether the IPv6 address of the NIC is valid.
Unlike IPv4, you must specify a Nic Interface when using the Ping6 command. Otherwise, the system will not know which network device to send data packets to. I indicates that Interface, eth0 is the first Nic, and c indicates the loop, 3 indicates three Ping6 operations. The result is shown in Figure 2:
# Ping6-I eth0-c 1 fe80 :: 200: e8ff: fea0: 2586
3. use IP commands
The IP command is a powerful network configuration tool in the iproute2 software package. it can replace some traditional network management tools. For example, ifconfig and route.
(1) use the "ip" command to view the IPv6 route table:
(3) use the IP command to set the multi-point propagation Neighbor Solicitation of IPv6
The IPv6 Neighbor disbor inherits IPv4's ARP (Address Resolution Protocol). you can obtain information about network neighbors again and edit/delete it. you can use the IP command to know the network neighbor settings (where, 00: 01: 24: 45: 67: 89 is the MAC address of the data link layer of the network device ):
# Ip-6 neigh show fe80: 201: 23ff: fe45: 6789 dev eth0 ll addr 00: 01: 24: 45: 67: 89
Router nud reachable
Firewall for Linux Ipv6 network environment
Installation:
The key to firewall based on Linux 2.4 kernel is iptables. In the 2.2 series, it replaces ipchains and ipfwadm before the 2.0 series. If you want to use any form of firewall, you need to install iptables.
Configure iptables
Iptables is an IP information packet filtering system integrated with the mainstream Linux kernel version 2.4.x. If the Linux system is connected to the Internet or LAN, server, or a proxy server connected to the LAN and Internet, the system facilitates better control of IP packet filtering and firewall configuration on the Linux system. The netfilter/iptables IP information packet filtering system is a powerful tool that can be used to add, edit, and remove rules. these rules are used for filtering and determining information packets, rules of the firewall. These rules are stored in a dedicated information packet filtering table, which is integrated into the Linux kernel. In the information packet filtering table, rules are grouped in a chain. The following describes these rules and how to create them and group them in the chain.
(1) clear old rules:
# Ip6tables [-FXZ]
Parameter description:
-F: clear all predefined rules;
-X: kills all tables created by users ).
-Z: returns the count and traffic statistics of all chains to zero.
INPUT: the data packet is the direction of the INPUT host;
OUTPUT: the data packet is the direction of the OUTPUT host;
FORWARD: The direction in which data packets are transmitted out of the host;
PREROUTING: work performed before the route entry;
OUTPUT: the data packet is the direction of the OUTPUT host;
POSTROUTING: work performed after entering the route.
TCP: TCP packet.
UDP: UDP data packets;
-S: IP address or network of the source data packet.
-- Sport: port number of the source data packet.
-D: IP address or network of the target host.
-- Dport: the port number of the target host.
ACCEPT: ACCEPT this packet.
DROP: drops data packets.
(3) example:
1. allow ICMPv6 data packets to enter the host (that is, you can Ping the Ipv6 address of the host ):
#/Sbin/ip6tables-a input-I sit +-p icmpv6-j ACCEPT
2. allow ICMPv6 data packets to be output from the host:
# Ip6tables-a output-o sit +-p icmpv6-j ACCEPT
3. the allowed IP address is 3ffe: ffff: 100: 1/128, and SSH is used for data.
# Ip6tables-a input-I sit +-p tcp-s 3ffe: ffff: 100: 1/128 -- sport 512: 65535
? -- Dport 22-j ACCEPT
The full name of SSH is Secure SHell. By using SSH, you can encrypt all transmitted data so that the "intermediate server" attack method is impossible and can also prevent DNS and IP spoofing. Another advantage is that the data transmitted is compressed, which can speed up transmission. SSH has many functions. it can replace telnet and provide a secure "channel" for ftp, pop, and even ppp ". SSH is bound to port 22, and its connections are encrypted using RSA through negotiation. After the authentication is complete, all subsequent traffic is encrypted using IDEA. The SSH (Secure Shell) program can log on to the remote host over the network and execute commands. The SSH encrypted tunnel only protects the security of intermediate transmission, so that any common sniffing tool software cannot obtain the sent content.
Security tools for IPv6 networks
Nmap is released under the Free Software Foundation's GNU General Public License (GPL). it is developed and maintained by Fyodor and can be downloaded from www.insecure.org/nmap for free. Nmap is an excellent port scanning tool running on a single host and a large network. it features high speed, security, and can bypass the firewall. It supports multiple protocols, such as TCP, UDP, and ICMP. Nmap also has many high performance and reliability features, such as dynamic latency computing, packet timeout re-transmission, parallel port scanning, and detection of host failure through parallel ping6. It supports IPv6. Download link: http://gd.tuwien.ac.at/infosys/security/nmap/nmap-3.48.tgz
The nmap Installation and compilation process is as follows:
# Tar zxvf nmap-3.48.tgz
# Cd nmap-3.48
#./Configure; # make install
Nmap scan type
Nmap syntax is quite simple: different nmap options and the-s flag form different scanning types. the Ipv6 version of nmap supports two scanning methods:
-ST is Port Scanning, which is usually called Port scan.
-SS is tcp syn, which is usually called semi-development scanning.
Nmap scan Port instance:
# Nmap-6-sT: 1
Starting nmap 3.48 (http://www.insecure.org/nmap/) at UTC
All 1657 scanned ports on: 1 are: closed
Nmap run completed -- 1 IP address (1 host up) scanned in 20.521 seconds
The output scan report shows that Nmap has scanned 1657 ports. one is enabled, and the other is disabled.
Note: If you plan to use Nmap in an IPv6 network, the following experiences may help you:
● Avoid misunderstanding. Do not randomly select the scan target to test Nmap. Many organizations regard port scanning as malicious, so it is best to test Nmap on the internal network. If necessary, tell your colleagues that you are experimenting with port scanning because scanning may cause IDS alarms and other network problems.
● Establish Security benchmarks. With the help of Nmap, reinforce the network and find out which systems and services may be attacked. The next step is to establish a security benchmark from these known systems and services, in the future, if you want to enable a new service or server, you can easily perform the operation based on this security benchmark.
If you want to view Linux programs working on Ipv6 networks, visit: http://www.netcore.fi/pekkas/ Linux/ipv6/Here you can find many RPM packages with IPv6 support.
Table 1 Comparison of IPv4 and IPv6 functions in Linux
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service