简单的防火墙个人实验

#环境准备

[root@internet ~]#hostname -I

192.168.0.6

[root@internet ~]#route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 eth0

0.0.0.0 192.168.0.8 0.0.0.0 UG 0 0 0 eth0

[root@firewall ~]#hostname -I

10.0.0.8 192.168.0.8

[root@firewall ~]#vim /etc/sysctl.conf

net.ipv4.ip_forward=1

[root@firewall ~]#sysctl -p

[root@lanserver1 ~]#hostname -I

10.0.0.7

[root@lanserver1 ~]#route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

0.0.0.0 10.0.0.8 0.0.0.0 UG 100 0 0 eth0

10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0

[root@lanserver2 ~]#hostname -I

10.0.0.17

[root@lanserver2 ~]#route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

0.0.0.0 10.0.0.8 0.0.0.0 UG 100 0 0 eth0

10.0.0.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0

posted @ 2022-11-11 20:31  zengweijie  阅读(52)  评论(0)    收藏  举报