####################################################################

# R1
# Cisco IOS Software, C2900 Software (C2900-UNIVERSALK9-M), Version 15.7(3)M5, RELEASE SOFTWARE (fc1)

# Factory reset

reload

# In minicom, hit: Ctrl A, F

confreg 0x2142  # skip loading startup-config
reset

Would you like to enter the initial configuration dialog? [yes/no]: no

en
write erase

conf t
config-register 0x2102  # re-enable loading startup-config
end

write

reload


# set host and domain

conf t
host R1
ip domain-name localdomain
end
write

# configure g0/0

conf t
interface GigabitEthernet0/0
ip address 10.0.0.41 255.255.255.0
no shut
end
write

# add user

conf t
service password-encryption
enable secret changeme
username username password changeme

# configure SSH

crypto key generate rsa

line vty 0 4
transport input ssh
login local
password 0 changeme
exit

line console 0
logging synchronous
login local

# `ssh -oKexAlgorithms=+diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 -c aes256-ctr username@10.0.0.41`


####################################################################

Cisco ASA 5510 - Version 8.2(5)

interface Ethernet0/0
nameif outside
security-level 0
ip address 10.0.0.61 255.255.255.0 

interface Ethernet0/1
nameif inside
security-level 100
ip address 172.16.0.254 255.255.255.0

# NAT

nat (inside) 1 0.0.0.0 0.0.0.0
global (outside) 1 interface

# on inside subnet, `apt update` now works on host 172.16.0.10

# add access for inside web server 172.16.0.10

static (inside,outside) tcp interface www 172.16.0.10 www netmask 255.255.255.255
access-list outside extended permit tcp any any eq www

static (inside,outside) tcp interface https 172.16.0.10 https netmask 255.255.255.255
access-list outside extended permit tcp any any eq https

access-group outside in interface outside

# from a host on 10.0.0.0/24 `curl 10.0.0.61` now works

# allow echo-reply, so the reply to a ping can reach the inside

access-list outside extended permit icmp any any echo-reply
# access-group outside in interface outside   # already done above, doing it again clears previous :(

# allow traceroute from inside

access-list outside extended permit icmp any any time-exceeded  # type 11
access-list outside extended permit icmp any any unreachable    # type 3

# allow SSH

enable password changeme
username username password changeme privilege 15
aaa authentication ssh console LOCAL
ssh 10.0.0.0 255.255.255.0 outside

domain-name localdomain
crypto key generate rsa mod 2048
ssh version 2

# from outside `ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -c aes128-cbc username@10.0.0.61`

####################################################################

Configure telnet access:

username gd secret changeme
enable secret changeme

line vty 0 4
logging synchronous
login local
transport input telnet

####################################################################

# cisco 1841 factory reset

# get to the `rommon 1>` prompt

# In minicom hit Ctrl a, f

# or maybe using Ctrl + Break or (see below)

rommon 1 > confreg 0x2142

# or for ASA:

confreg 0x41

rommon 2 > reset

[...]

Would you like to enter the initial configuration dialog? [yes/no]: no

Router>en

Router#write erase

Router#conf t

Router(config)#config-register 0x2102

Router(config)#^Z



From https://dcloud-cms.cisco.com/help/reset_router


####################################################################

# serial over USB breaks Ctrl + b

# as root
sudo su -

# simulate sending Ctrl + b using screen
screen -L /dev/ttyUSB0 1200

# then hold space for 15 seconds

# then kill screen

Ctrl + a, d
killall -9 screen

# and then back in minicom
minicom -s

# there will be the `rommon>` prompt

####################################################################

# Cisco 3550 factory reset:

# power up while holding "mode" button, then:

flash_init
delete flash:config.text
delete flash:vlan.dat
boot

   Page Updates
Apache Bench load testing
Console::Blackjack
RetroPie Arcade
Factorio on systemd
Generate new Factorio map
   Recent Articles
Install xfce4 on Debian
Console Blackjack in Perl
Selenium::WebDriver::Error::UnknownError
Game of Life in C++ using the SDL2
PigPen (dots and boxes) in C++ using the SDL2
   Tags
active-record (2) android (1) apache (1) apt (1) arcade (1) awk (2) bash (2) bashrc (1) battleship (1) bdd (1) blackjack (12) book (1) books (1) build (1) c (2) c++ (2) cacti (1) capybara (1) ccna (1) cisco (1) clang (1) clang++ (1) console (5) cpp (2) crm (1) crystal (1) data (1) debian (7) diff (1) elixir (1) factorio (2) fedora (1) firewall (1) freebsd (1) g++ (1) game (4) games (1) gcc (1) gem (1) git (3) github (1) gmail (1) go-lang (3) google-chrome (1) haml (1) home (1) infix (1) irssi (1) kernel (3) lab (1) latin1 (1) life (1) linux (6) lottery (1) matrix (1) meta (1) microsoft (1) moarvm (1) model (1) module (1) mongodb (1) mp3s (1) mutt (1) nautical (1) nqp (1) object (1) oidentd (1) operator (1) orm (2) pair-programming (1) pairing (1) patch (1) perl (1) pigpen (1) postgresql (2) powerball (1) programming (1) psql (1) python (2) python3 (1) raku (16) raspberry-pi (1) raspberrypi (1) reactjs (2) readline (1) retropie (1) reversi (1) rhel (1) ruby (1) sdl2 (4) sed (1) selenium (1) selinux (1) snmpd (1) split (1) ssh (1) stack (1) systemd (1) template (1) test (1) testing (3) tictactoe (1) trace (1) typescript (2) ubuntu (2) utf8 (1) virus (1) war (1) xargs (1) xfce4 (1) xvfb (1) zef (1)
   Twitter

Copyright © 2005 - 2021

GregDonald.com · Contact

All Rights Reserved