Lesson5 -Linux Network Configuration
2016-03-23 23:47
337 查看
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
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
相关文章推荐
- Lesson4 -Users, Groups and Permissions in Linux
- linux服务器的端口测试工具
- CentOS7安装使用MySQL
- linux下用户和组相关的文件及相关管理命令
- linux及安全第五周总结——20135227黄晓妍
- linux(ubuntu)下用eclipse运行C,可是一直提示nothing to build for project ProjectName
- centos在安装配置redmine
- 浅谈linux的死锁检测 【转】
- Linux内核死锁检测机制【转】
- LINUX内核设计第五周——扒开系统调用的三层皮(下)
- Linux软连接和硬链接
- centos 6.4 QT5 的安装,找不到GLIBCXX_3.4.15的解决办法
- linux内核分析 第5章读书笔记
- linux标准库红黑树的使用示例
- 《Linux内核分析》第五周 扒开系统调用的三层皮(下)
- linux上基本命令以及jdk部署
- linux定时任务
- Linux为什么使用DeviceTree
- Linux Makefile与Shell的问题
- linux下比较文件