Skip to content

Instantly share code, notes, and snippets.

@molcay
Last active December 28, 2016 12:57
Show Gist options
  • Select an option

  • Save molcay/e7b458bcec0fc108aa579ab25d2d689e to your computer and use it in GitHub Desktop.

Select an option

Save molcay/e7b458bcec0fc108aa579ab25d2d689e to your computer and use it in GitHub Desktop.
Assignment 06 C Part Configuration Commands

Assginment6 C

  • R26 and 2R7 configuration for 15 (SSH enabling).

    enable
    conf t
    username admin privilege 15 secret netseclab
    aaa new-model
    aaa authentication login default local
    enable secret netseclab
    service password-encryption
    ip domain name netseclab
    crypto key generate rsa
    1024
    line vty 0 15
    transport input ssh
    login authentication
    password netseclab
    exit
    ip ssh version 2
    exit
    
  • R26 and 2R7 configuration for 16 (Scenario 1).

    In R26 (to only permit ssh connection came from R27. IP of R27 is 7.7.7.1):

    ena
    conf t
    ip access-list extended SSH_ACCESS
    remark "Permit only R27 (7.7.7.1)"
    permit tcp host 7.7.7.1 any eq 22
    exit 
    interface serial 6/7
    ip access-group SSH_ACCESS in
    exit
    

    In R27 (to only permit ssh connection came from R26. IP of R26 is 7.7.7.2):

    ena
    conf t
    ip access-list extended SSH_ACCESS
    remark "Permit only R26 (7.7.7.2)"
    permit tcp host 7.7.7.2 any eq 22
    exit 
    interface serial 6/7
    ip access-group SSH_ACCESS in
    exit
    

    In R26 (to only permit ssh connection came from Network Admin's PC which is in Loopback0 Network. IP of PC is 70.0.0.2):

    ena
    conf t
    ip access-list extended SSH_ACCESS_FOR_NW_ADMIN
    remark "only permit network admin to ssh over Loopback0"
    permit tcp host 70.0.0.2 host 70.0.0.1 eq 22
    exit
    int Lo0
    ip access-group SSH_ACCESS_NW_ADMIN in
    exit
    

    In R27 (to only permit ssh connection came from Network Admin's PC which is in Loopback0 Network. IP of PC is 70.0.0.14):

    ena
    conf t
    ip access-list extended SSH_ACCESS_FOR_NW_ADMIN
    remark "only permit network admin to ssh over Loopback0"
    permit tcp host 70.0.0.14 host 70.0.0.13 eq 22
    exit
    int Lo0
    ip access-group SSH_ACCESS_NW_ADMIN in
    exit
    
  • R26 and 2R7 configuration for 17 (Scenario 2).

    enable
    conf t
    ip access-list extended LOOPBACK1
    remark "Permit only HTTP, HTTPs, ICMP"
    permit tcp any any eq 80
    permit tcp any any eq 443
    permit icmp any any 
    deny ip any any
    exit
    int Loopback1
    ip access-group LOOPBACK1 in
    exit
    
    ip access-list extended LOOPBACK2
    remark "Permit every connection but deny HTTP, HTTPs, ICMP"
    deny tcp any any eq 80
    deny tcp any any eq 443
    deny icmp any any 
    permit ip any any
    exit
    int Loopback2
    ip access-group LOOPBACK2 in
    exit
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment