Exempel 4

TCP kan också utföra grundläggande brandvägsfunktioner med nyckelordet TCP established. Nyckelordet gör det möjligt för intern trafik att lämna det inre privata nätverket samt tillåter den återkommande svarstrafiken att komma in i det inre privata nätverket. TCP-trafik som genereras av en extern host och som försöker kommunicera med en intern host nekas dock.

I topologin nedan inkluderas ett DMZ nätverk med syfte att göra HTTP och SMTP servrar åtkomliga från Internet. Observera att servrarna har placeras i det privata nätverket 192.168.2.0 /24. Samtidigt LAN 192.168.1.0 /24 ska skyddas så att utkommande nätverkstrafik ska tillåtas men återkommande ska begränsas.

I exemplet beställer PC3 en hemsida från webbservern google.com och denna servern ska svara genom att skicka hemsidan till PC3. Det är det som ska hanteras med en extended ACL.

Nätverkstopologi

Konfigurationer

  1. Tillåt HTTP och SMTP nätverkstrafik från Internet till DMZ nätverk
  2. Tillåt återkommande HTTP och HTTPS nätverkstrafik från webbservern google.com till det privata LAN 192.168.1.0 /24 
  • HTTP Server
  • IPv4 Address: 192.168.2.5
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.2.1
  • DNS Server: 192.168.2.5
  • SMTP Server
  • IPv4 Address: 192.168.2.6
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.2.1
  • DNS Server: 192.168.2.5
  • FTP Server
  • IPv4 Address: 192.168.1.7
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.1.1
  • DNS Server: 192.168.2.5
  • google.com Server
  • IPv4 Address: 8.8.8.8
  • Subnet Mask: 255.255.255.240
  • Default Gateway: 8.8.8.1
  • DNS Server: 8.8.8.8
  • PC3
  • IPv4 Address: 192.168.1.3
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.1.1
  • DNS Server: 192.168.2.5
  • PC4
  • IPv4 Address: 192.168.1.4
  • Subnet Mask: 255.255.255.0
  • Default Gateway: 192.168.1.1
  • DNS Server: 192.168.2.5
  • Router> enable
  • Router# configure terminal
  • Router(config)# hostname R2
  • R2(config)# no ip domain-lookup
  • R2(config)# interface fa1/0
  • R2(config-if)# description Connected to Google
  • R2(config-if)# ip address 8.8.8.1 255.255.255.240
  • R2(config-if)# duplex auto
  • R2(config-if)# speed auto
  • R2(config-if)# no shutdown
  • R2(config-if)# exit
  • R2(config)# interface fa0/0
  • R2(config-if)# Connected to Diginto
  • R2(config-if)# ip address 200.100.10.2 255.255.255.252
  • R2(config-if)# duplex auto
  • R2(config-if)# speed auto
  • R2(config-if)# no shutdown
  • R2(config-if)# exit
  • R2(config)# ip route 192.168.0.0 255.255.0.0 200.100.10.1
  • R2(config)# end
  • R2#
  • Router> enable
  • Router# configure terminal
  • Router(config)# hostname R1
  • R1(config)# no ip domain-lookup
  • R1(config)# interface fa1/0
  • R1(config-if)# description Connected to Protected LAN
  • R1(config-if)# ip address 192.168.1.1 255.255.255.0
  • R1(config-if)# duplex auto
  • R1(config-if)# speed auto
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • R1(config)# interface fa2/0
  • R1(config-if)# description Connected to DMZ
  • R1(config-if)# ip address 192.168.2.1 255.255.255.0
  • R1(config-if)# duplex auto
  • R1(config-if)# speed auto
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • R1(config)# interface fa0/0
  • R1(config-if)# description Connected to Internet
  • R1(config-if)# ip address 200.100.10.1 255.255.255.252
  • R1(config-if)# duplex auto
  • R1(config-if)# speed auto
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • R1(config)# ip route 0.0.0.0 0.0.0.0 200.100.10.2
  • R1(config)# 
  • Tillåt åtkomst från Internet till DMZ
  • R1(config)# access-list 100 permit tcp any 192.168.2.0 0.0.0.255 eq 80
  • R1(config)# access-list 100 permit tcp any 192.168.2.0 0.0.0.255 eq 25
  • Tillåt återkommande nätverkstrafik från Internet
  • R1(config)# access-list 100 permit tcp any eq 80 192.168.1.0 0.0.0.255 established
  • R1(config)# access-list 100 permit tcp any eq 443 192.168.1.0 0.0.0.255 established
  • Applicera ACL 100
  • R1(config)# interface fa0/0
  • R1(config-if)# ip access-group 100 in
  • R1(config-if)# end
  • R1#