十年網(wǎng)站開發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營維護(hù)+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
在路由上建立ACL擴(kuò)展的配置要求如下:
1、允許PC1訪問Linux的web服務(wù)
2、允許PC2訪問Linux的ftp服務(wù)
3、禁止PC1與PC2訪問Linux的其它服務(wù)
4、允許PC1訪問PC2

1、pc1、pc2以及Linux系統(tǒng)均設(shè)置靜態(tài)IP、子掩及網(wǎng)關(guān),并且進(jìn)行對(duì)應(yīng)的網(wǎng)卡綁定。
2、完成Linux服務(wù)器相關(guān)服務(wù)的安裝與啟動(dòng)
[root@localhost ~]# yum install vsftpd -y //安裝ftp服務(wù)
[root@localhost ~]# yum install httpd -y //安裝http服務(wù)
[root@localhost ~]# systemctl stop firewalld.service //關(guān)閉防火墻
[root@localhost ~]# setenforce 0 //關(guān)閉增強(qiáng)性安全功能
[root@localhost ~]# systemctl start httpd //啟動(dòng)服務(wù)
[root@localhost ~]# systemctl start vsftpd
[root@localhost ~]# netstat -ntap | egrep '(21|80)' //檢查服務(wù)啟動(dòng)狀況(80端口為http,21端口為ftp)
tcp6 0 0 :::80 :::* LISTEN 6399/httpd
tcp6 0 0 :::21 :::*3、路由的配置:三個(gè)端口設(shè)置IP
R1#conf t
R1(config)#int f 0/0
R1(config-if)#ip add 192.168.90.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int f 0/1
R1(config-if)#ip add 192.168.80.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#int f 1/0
R1(config-if)#ip add 192.168.100.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#ex
R1(config)#do show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
C 192.168.90.0/24 is directly connected, FastEthernet0/0
C 192.168.80.0/24 is directly connected, FastEthernet0/1
C 192.168.100.0/24 is directly connected, FastEthernet1/04、進(jìn)行擴(kuò)展ACL的配置
R1(config)#access-list 100 permit tcp 192.168.80.20 0.0.0.255 192.168.100.100 0.0.0.255 eq 80
R1(config)#access-list 100 permit tcp host 192.168.90.10 host 192.168.100.100 eq 21
R1(config)#access-list 100 permit ip host 192.168.80.20 192.168.90.0 0.0.0.255
R1(config)#do show access-list
Extended IP access list 100
10 permit tcp 192.168.80.0 0.0.0.255 192.168.100.0 0.0.0.255 eq www
20 permit tcp host 192.168.90.10 host 192.168.100.100 eq ftp
30 permit ip host 192.168.80.20 192.168.90.0 0.0.0.255
R1(config)#int f0/1
R1(config-if)#ip access-group 100 in
R1(config-if)#int f0/0
R1(config-if)#ip access-group 100 in
R1(config-if)#ex5、結(jié)果測(cè)試
pc1可以訪問web網(wǎng)站服務(wù)
pc2可以訪問ftp服務(wù)
允許pc1訪問pc2
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)cdcxhl.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。