Securing Remote Management and Disabling Unnecessary Services
Nerd Cafe
Objective:
Configure a Cisco router to ensure secure remote management and minimize exposure to potential threats by disabling unused services.
Topology Diagram:
Topology
Step 1: Configure Secure Remote Access
Set the Router's Hostname and Domain Name:
Generate RSA Key Pair for SSH:
Note: A key modulus of 2048 bits is recommended for stronger encryption.
Configure VTY Lines for SSH Access Only:
Create an Access Control List (ACL) to Restrict Management Access:
Explanation: This ACL permits access only from the 192.168.202.0/24 network. Adjust the IP range as per your management network.
Apply the ACL to VTY Lines:
Step 2: Configure Session Management
Set an EXEC Timeout for Idle Sessions:
Explanation: This configuration disconnects idle sessions after 10 minutes.
Disable the Auxiliary (AUX) Port:
Explanation: Disabling the AUX port prevents unauthorized access via modem connections.
Step 3: Configure Login and EXEC Banners
Set the Login Banner:
Explanation: The ^C is a delimiter; you can use any character not present in the banner text.
Set the EXEC Banner:
Step 4: Disable Unnecessary Services
Disable HTTP and HTTPS Servers:
Explanation: Disabling these services prevents web-based management interfaces, which can be security risks if not properly secured.
Disable Identification Service:
Explanation: The Identification Protocol can provide unnecessary information to potential attackers.
Disable BOOTP Server:
Explanation: BOOTP is rarely used and can be disabled to reduce potential attack vectors.
Disable Proxy ARP on Interfaces:
Explanation: Disabling Proxy ARP prevents the router from answering ARP queries on behalf of other devices, enhancing security.
Verification:
Check SSH Configuration:
Verify VTY Line Configuration:
Confirm Disabled Services:
By following these steps, you've configured your Cisco router to allow secure remote management while disabling unnecessary services, aligning with the CIS Cisco IOS 12 Benchmark recommendations. Always remember to tailor configurations to your organization's specific security policies and operational requirements.
RO-nerd-cafe(config)#crypto key generate rsa
The name for the keys will be: RO-nerd-cafe.nerd-cafe.ir
Choose the size of the key modulus in the range of 360 to 4096 for your
General Purpose Keys. Choosing a key modulus greater than 512 may take
a few minutes.
How many bits in the modulus [512]: 2048
% Generating 2048 bit RSA keys, keys will be non-exportable...
[OK] (elapsed time was 2 seconds)
RO-nerd-cafe(config)#
*Mar 31 07:27:49.995: %SSH-5-ENABLED: SSH 1.99 has been enabled
RO-nerd-cafe(config)#
RO-nerd-cafe(config)#line aux 0
RO-nerd-cafe(config-line)#transport input none
RO-nerd-cafe(config-line)#exit
RO-nerd-cafe(config)#
RO-nerd-cafe(config)#banner login ^C
Enter TEXT message. End with the character '^'.
Unauthorized access is prohibited. All activities are monitored.
^C
RO-nerd-cafe(config)#
RO-nerd-cafe(config)#banner exec ^C
Enter TEXT message. End with the character '^'.
Welcome to SecureRouter. Authorized users only.
^C
RO-nerd-cafe(config)#
RO-nerd-cafe(config)#no ip http server
RO-nerd-cafe(config)#no ip http secure-server
RO-nerd-cafe(config)#no ip identd
RO-nerd-cafe(config)#no ip bootp server
RO-nerd-cafe(config)#interface fastEthernet 0/0
RO-nerd-cafe(config-if)#no ip proxy-arp
RO-nerd-cafe(config-if)#exit
RO-nerd-cafe(config)#interface fastEthernet 1/0
RO-nerd-cafe(config-if)#no ip proxy-arp
RO-nerd-cafe(config-if)#exit
RO-nerd-cafe(config)#