What's Popular

Meh, Whatever is Featured

Linking Active Directory to Palo Alto

 ###First you need to create a server profile under the LDAP section. DEVICE>Server Profiles>LDAP then click on the Add down at the bo...

Showing posts with label Router. Show all posts
Showing posts with label Router. Show all posts

Saturday, September 9, 2023

Setup DHCP Relay VyOS

#set service dhcp-relay interface YOUR_INTERFACE
Or,
#set service dhcp-relay server YOUR_SERVER_IP
#commit
#save

Reference:
https://docs.vyos.io/en/equuleus/configuration/service/dhcp-relay.html

Set an IP on an Interface in VyOS

#set interfaces ethernet YOUR_INTERFACE address YOUR_IP|dhcp|dhcpv6
#set interfaces ethernet YOUR_INTERFACE description DESCRIPTION_FOR_INTERFACE
#set interfaces ethernet YOUR_INTERFACE disable
#set interfaces ethernet YOUR_INTERFACE enable
#commit
#save

Reference:
https://docs.vyos.io/en/equuleus/configuration/interfaces/ethernet.html

Thursday, June 22, 2023

Setting Passwords Cisco Router/Switch

Set a password for Console login


RTR-01#config t

RTR-01(config)#line console 0

RTR-01(config-line)#login (turns on login enable ability. Otherwise will not prompt)

RTR-01(config-line)#password cisco123

RTR-01(config-line)#end


Set an enable secret password


RTR-01#config t

RTR-01(config)#enable secret cisco123

RTR-01(config)#exit

RTR-01#disable (takes you back to user mode)

RTR-01>enable

Enter password: YOUR_PASSWORD_NOW


Set VTY password


RTR-01#config t

RTR-01(config)#line vty 0 15

RTR-01(config-line)#login (enables the login feature to the VTY line)

RTR-01(config-line)#password cisco123 (sets the password for the line login)

RTR-01(config-line)#end


Enable Global Password Encryption


RTR-01#config t

RTR-01(config)#service password-encryption

Thursday, January 27, 2022

Disable Telnet on Cisco Switch and Router

 1.    You must disable Telnet on your Cisco switch/router since it will be enabled by default and will not disable until you manually disable it.

2.    RTR-01>enable

3.    RTR-01#conf t

4.    RTR-01 (config) #line vty 0 15

5.    RTR-01 (config-line) #transport input ssh
    a.    This transport command is telling the switch/router to only accept SSH connections

6.    RTR-01 (config-line) #end

7.    RTR-01#write

Wednesday, January 26, 2022

Change SSH Version

1.    When you enable SSH, it might default to a version number that you are not running or do not wish to run. Make sure to enable the correct version.

2.    First, you can find out which version you are running by doing the following:
    a.    RTR-01>enable
    b.    RTR-01#show run | include ssh version
        i.    Here it will show you which version of SSH you are running
        ii.    You can also just type RTR-01#show ip ssh

3.    Next, you can change your version of SSH
    a.    RTR-01>enable
    b.    RTR-01#conf t
    c.    RTR-01 (config) #ip ssh version YOUR_DESIRED_VERSION
    d.    RTR-01 (config) #end
    e.    RTR-01#write
        i.    Or copy-running-config startup-config

4.    Now, verify your version number:
    a.    RTR-01#show ip ssh
    b.    Orr you can type: RTR-01#show run | include ssh version

Monday, January 17, 2022

Create User and Password for Cisco Device

1.    First, you will need to determine if you want a normal user, or an admin user. The following is for a normal user:
    a.    >enable
    b.    #conf t (configure terminal)
    c.    (config) #username YOUR_USER_NAME secret USER_PASSWORD

2.    If you wish to create an admin user, the following can be done”
    a.    >enable
    b.    #conf t
    c.    (config) #username YOUR_USER_NAME privilege 15 secret USER_PASSWORD

3.    Finally, you will need to enable logins into the switch/router by doing the following:
    a.    >enable
    b.    #conf t
    c.    (config) #enable secret DESIRED_PASSWORD_HERE
        i.    This will start requiring you to utilize logins into the switch and also with a default password
        into the switch too.

4.    You have now created a basic lockdown on your Cisco device. Again, this is just super basic utilizing the Cisco built in login local database.

5.    Which you can enable (if you have not already) this way:
    a.    For the console line:
    b.    >enable
    c.    #conf t
    d.    (config) #int line con 0
    e.    (config-line) #login local
    
    f.    And finally for your VTY lines:
    g.    >enable
    h.    #conf t
    i.    (config) #line vty 0 15
    j.    (config-line) #login local

6.    The main thing you need here is the login local command. This tells the switch/router to use the local user database to login.

Sunday, August 22, 2021

Password Recovery for Old/Used Cisco Switch or Router

Sometimes you will obtain an old or used Cisco Switch or Router which has configurations on the device. You can still access the device if you don’t know the password. You can perform the following steps to recover the device all the while saving configurations too.

1.    Connect to the console port.
    a.    Ensure you have a console cable with the prolific device driver. Some cheaper console cables will not allow you to send the break signal during the router/switch boot process.

2.    Reboot the device and send a break signal within the first 30 seconds.
    a.    During reboot you have 30 seconds to send the break signal and interrupt the boot process. This is why you need a higher quality cable with the prolific device driver for break signals.
    b.    You are doing this to enter Rommon boot mode. To change were it looks for the startup configuration.
    c.    You have the following options for sending the break command since laptops and computers are all different:
        i.    Pause/Break key or Ctrl+Pause/Break on keyboard (This is usually the standard for regular keyboards)
        ii.    #Ctrl+Fn+F11
        iii.    #Fn+B
        iv.    #Ctrl+B
        v.    #Ctrl+Fn+B
    d.    Finally, PuTTY has an option to send the break command through the menus:
        i.    Under the PuTTY menu, hover over “Special Command”
        ii.    Then select the “Break” option there.

3.    Modify the Configuration register.
    a.    You are doing this in order to keep it from loading the previous configuration into the running-config. This allows us to bypass the password from the currently installed configuration.
    b.    In Rommon state, there is no OS loaded. It is for recovery purposes. We want to change the “confreg” setting. Type this in:
        i.    #confreg 0x2142
            1.    0x2142 puts it in a state of ignoring the VNRAM contents/startup configuration. But this keeps the old configuration in the system.
            2.    0X2102 is the normal state of boot. Makes it operate normally.
    c.    Next we reset the device to reboot with the new confreg code.
        i.    #reset

4.    Now you can recover your configuration in the router or switch and reset the passwords.
    a.    After reboot, you say “NO” to initial configuration dialog.
    b.    You are now in the router/switch without a configuration.
    c.    Your old configuration is in the startup-config. You can even do a:
        i.    #show startup-config
        ii.    And you can see your old configuration on the router/switch.
    d.    Now we can copy the startup-config into our running-config and we maintain admin rights without the old passwords blocking us:
        i.    #copy startup-config running-config
    e.    Also you can now reset your passwords in global config mode:
        i.    #conf t
        ii.    #enabled secret cisco
        iii.    #line con 0 password cisco
        iv.    And continue with others you wish to reset.
    f.    Make sure to save the configuration:
        i.    #write/#copy run start

5.    Revert the configuration register to the original boot so now you can load your configurations with the new password.
    a.    We have a final step to do. We will need to change that boot process again since that 0x2142 is not the normal boot state. We need to change it back to 0x2102.
        i.    #show version (shows the router/switch status and what the boot reg is set to)
        ii.    #conf t
        iii.    #config-register 0x2102
        iv.    #write
    b.    Now you can reboot with new passwords and your original configuration.

Friday, April 24, 2020

Wipe and Clear Configuration on Cisco Catalyst Router/Switch

This one is a simple one. We will be clearing out the configurations on Catalyst equipment. If you have a bunch of configurations you just want to clear so you can start from scratch, do the following:
1. Go to Privilege Mode
a. #enable
2. Erase the configuration:
a. #write erase
3. Restart the system:
a. #reload
b. #confirm (just hit enter here)

Tuesday, December 11, 2018

NTP Settings Cisco Router and Switch

To show the current clock time
o #show clock
Configure net NTP server:
o #ntp server IPAddressofNTPServer
Show current NTP configurations:
o #show ntp associations
Show current NTP synchronization status:
o #show ntp status


Reference:
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/12-2_55_se/configuration/guide/scg_2960/swadmin.html

Monday, July 9, 2018

Enabling SSH on Cisco Device

Warning!! These are just basic SSH configurations made in a lab environment. In no way am I recommending these configurations! Please consult your security policies before implementing any security features across your network.

First off, you must associate the device to a domain name, or FQDN for the system to generate encryption keys.
o Ip domain-name “YourDomainNameHere”
Example: ip domain-name lab.local
Next you need to generate the encryption keys. These keys will now be associated with your FQDN, or domain:
o “crypto key generate rsa”
o You should get a message saying keys will now be associated to your domain and should see your domain name: Switch1.lab.local
o You should now see “How many bits in the modulus [512]” This is just your encryption level. 512 is weak, 1024 is standard. More encryption equates to slower speeds. We will input 1024
Next, we will input the command to the VTY terminals to allow SSH:
o Select the VTY lines “vty 0 4” 0 space 4 says, grab all of the lines from 0 to 4. This will program all of them at once.
o Next command: “transport input ssh” this will allow ssh only, you can also do: “transport input ssh telnet” to allow both telnet and ssh. Telnet is not recommended.
o Next do the password: “password cisco”
o Then enable login of the actual lines by typing the command: “login”. This will actually allow the logon ability.
o If you want the local user database to login: “login local” command will allow local logins from the local database. This step requires another step below in order to create accounts to SSH into the device.
Finally, we need to create user accounts for the remote logins. You will create a user by the following steps:
o “username YourUserName secret “YourPassword”
o Example: “username user2 secret cisco”
o You can use secret, or password, but secret is more secure as password will be stored plain text.
Now you can fully log into the device with your newly created username and password.

Warning!! These are just basic SSH configurations made in a lab environment. In no way am I recommending these configurations! Please consult your security policies before implementing any security features across your network.

Sunday, July 1, 2018

Common and Basic Cisco Commands

Common and Basic Cisco Commands
This list is just a quick list of tips and commands that are only for my reference. These are just quick inputs and notes, and these are not considered a walkthrough. This list will constantly be updated over time and when I have time to update it.

·         You type in something wrong and get the “Translating “your incorrect entry” …domain server (255.255.255.255), you can stop this in the middle of it by the following:
o   Ctrl+Shift+6 will abort this process.
·         To prevent the Cisco device from trying to resolve an incorrect entry into an IP address, you can put in the following:
o   Escalate up to “configure terminal” mode
o   Enter the following command: #no ip domain-lookup
·         You can see the previous history of entered commands by typing in:
o   #show history
o   If you want to change the size of the history, perform the following:
§  Escalate to configure terminal level
§  Select console line by typing the following: #line console 0
§  Next type in #history size 50. You can put in any number from 0-256 for how many lines you want history to remember.
·         You can exit by doing Ctrl+Z or by typing #exit.
o   Typing #end will take you all the way back to the beginning of the Cisco device privilege modes.
·         You can see what is on the hard drive or flash of a Cisco device by typing in #show flash.
o   If you want to remove files on the flash, execute the following:
§  #delete flash:’filename’
§  Confirm the deletion.
o   Sometimes files can be deleted by the following command (if they are still stored and not being deleted) #squeeze flash.
·         One vital command which is helpful is the ability to reload the router through CLI. This is performed by typing the following command:
o   #reload in 5
o   This reboots the router in 5 minutes. You can have it reboot in any amount of time you designate.
o   This allows you to wipe the configuration if you have not already committed the changes and saved to the flash.
o   #reload cancel cancels the reboot.
·         #show running-config to show the current configurations which are running on the Cisco device.
·         #show startup-config to show the configurations which will be loaded into the Cisco device upon boot.
·         #copy running-config startup-config” will give you the option to save your current running configuration to the startup configuration fle.
o   #copy run startup-config and #write memory commands also save the configurations (can also just type write).
·         #write erase will allow you to erase your saved configurations in NVRAM and take you back to factory defaults.
·         To kick users from the device execute the following:
o   #show users
o   #clear line vty #
·         To show spanning-tree information for priorities, if an interface is blocked, designated, or the switch is root, and other information:
show spanning-tree” will display the information.