Linux Configure static IP, turn off firewall

Source: Internet
Author: User
Tags nameserver

Installing centos6.5 under VMware accesses the extranet via bridging, so you need to configure the IP.

I. IP configuration

1.1. Configure Dynamic IP

Vi/etc/sysconfig/network-scripts/ifcfg-eth0

Device=eth0
hwaddr=00:0c:29:e1:e4:8e
Type=ethernet
uuid=f271bf73-7d8f-448f-8e8b-71c39eb13509
Onboot=yes (important is enabled)
Nm_controlled=yes
BOOTPROTO=DHCP (Important configuration)

2.2. Configure Dynamic IP

Device=eth0
Hwaddr=00:0c:29:b1:f1:24
Type=ethernet
uuid=8887bd2f-999f-4a85-912e-2a98b7ac4465
Nm_controlled=yes
Onboot=yes
Bootproto=static (Static)
broadcast=192.168.2.255
ipaddr=192.168.2.48 (the IP address must be the same network number as the host)
netmask=255.255.248.0 (subnet mask, must be the same as host)
gateway=192.168.1.1 (network management must be the same as host)
Arpcheck=no (important)

IP Settings for the host

  

2.3. Restart the network

Service Network restart

When the ping extranet discovers that DNS is not found, you need to configure DNS

2.4. DNS Configuration

VI /etc/resolv.conf

Add the following:

NameServer 8.8.8.8
NameServer 8.8.4.4

2.5. Restart

Service Network restart

Three. Turn off the firewall

3.1. Service iptables stop (off)

3.2. Chkconfig iptables off (permanently off)

3.3. Status View

Service Iptables Status

  

Linux Configure static IP, turn off firewall

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.