Linux Network configuration

Source: Internet
Author: User

One, configure the network

Configuration file:/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0//Device name

HWADDR=00:0C:29:43:95:49//Physical Address

Type=ethernet//Ethernet, NIC type

Onboot=yes//Whether random start

Bootproto=none//Whether to obtain IP automatically

ipaddr=192.168.155.10//IP Address

netmask=255.255.255.0//Subnet mask

gateway=192.168.155.1//Gateway

#DNS1 =192.168.155.1//This do not set, or remote connection, it is always not connected

dns2=8.8.8.8//ping External Network

Remote connection is not up, you can look at:1. Firewall has no off (IPTABLES-NVL)

2.selinux no off (Setenforce 0 off)

If you can't connect, you can set the firewall to allow connections:

Iptables-nvl-i input-p tcp-s 192.168.155.8--dport 22-j ACCEPT


This article from the "11842333" blog, reproduced please contact the author!

Linux Network configuration

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.