码迷,mamicode.com
首页 > Web开发 > 详细

Lesson5 -Linux Network Configuration

时间:2016-03-24 07:43:06      阅读:359      评论:0      收藏:0      [点我收藏+]

标签:linux   network configuration   

 basic tasks

1.ifconfig     show ip,networkcard infomation    eth0

2.sudo dhclient      release renew IP configuration

3.sudo /etc/init.d/neworking restart             restart networking servers when you change severs configuration

Configuration files

4. sudo vim /etc/network/interface

 auto eth0

  iface eth0 inet stadig

address  10.1.10.5

netmask

network 10.1.10.0

broadcast 10.1.10.255

gateway 10.1.10.1    router

auto eth0

ifces eth0 inet dhcp

edit DNS files

sudo vim /etc/resolv.conf

  10.1.10.1

hostname

sudo /bin/hostname  name      change hostname

remember restart

ping

ping 10.1.10.1  router

ping  www.com

control+c   stop ping

UFW  firewall

sudo ufw status    show firewall status

sudo ufw  default allow

                          deny

sudo ufw enable   turn on your firewall

              disable

sudo ufw allow 80   (allow port 80 come in)

              deny  80

sudo ufw delete  allow 80     (delete  rules)

                         deny

sudo ufw allow from 202.10.10.11

              deny                              (allow IP address)

sudo ufw allow from 202.80.1.108 to 22 (to this particular port)


本文出自 “SystemAdmin笔记” 博客,请务必保留此出处http://christhai.blog.51cto.com/1584747/1754520

Lesson5 -Linux Network Configuration

标签:linux   network configuration   

原文地址:http://christhai.blog.51cto.com/1584747/1754520

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!