Teach you how to complete Linux Network Address Configuration

Source: Internet
Author: User

If you want to know about Linux, learn about Linux. This article explains the Linux Network Address Configuration for you. I hope you can understand the Linux Network Address Configuration. Let's talk about this in detail.

1. Disable and enable the network port:

Enable port 81:
Iptables-I input-I eth0-p tcp -- dport 81-j ACCEPT
Iptables-I OUTPUT-o eth0-p tcp -- sport 81-j ACCEPT

Close port 81:
Iptables-I input-I eth0-p tcp -- dport 81-j DROP
Iptables-I OUTPUT-o eth0-p tcp -- sport 81-j DROP

2. Disable and enable physical ports
UP: ifconfig eth0 up
DOWN: ifconfig eth0 down
Or
/Sbin/ifup eth0
/Sbin/ifdown eth0
/Sbin/ifup | ifdown is a symbolic link to/etc/sysconfig/network-scripts/ifup | down

3. Configure the network address

A. ifconfig eth0 x. x netmask x. x broadcast x.

B. Configure through the configuration file
/Etc/sysconfig/network-scripts/file for configuring ifcfg-xx
Such as: ifcfg-eth0
If you want to configure multiple addresses on a network card, the configuration file is ifcfg-eth0: 1, ifcfg-eth0: 2, etc.

C. restart the network service,/etc/init. d/network restart or service network restart

In this way, you can easily complete the Linux Network Address Configuration.

  1. Migration of Linux compressed files
  2. Describe Linux Device File Management hardware devices
  3. Linux mobile OS makes achievements in the future mobile phone industry
  4. Getting started with embedded Linux
  5. Install the Linux firewall to ensure Network Security

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.