added files from older tasks
This commit is contained in:
32
auxilary/Cisco-Router_commands_backup.sh
Normal file
32
auxilary/Cisco-Router_commands_backup.sh
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
en
|
||||||
|
conf t
|
||||||
|
|
||||||
|
int e0/1
|
||||||
|
ip address 10.20.0.1 255.255.255.0
|
||||||
|
ip nat inside
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
int e0/2
|
||||||
|
ip address 10.20.200.1 255.255.255.252
|
||||||
|
ip nat inside
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
int e0/0
|
||||||
|
ip address dhcp
|
||||||
|
ip nat outside
|
||||||
|
no shutdown
|
||||||
|
do wr
|
||||||
|
|
||||||
|
router ospf 1
|
||||||
|
network 10.20.0.0 0.0.0.255 area 0
|
||||||
|
network 10.20.200.0 0.0.0.3 area 0
|
||||||
|
do wr
|
||||||
|
|
||||||
|
access-list 1 permit 10.20.0.0 0.0.255.255
|
||||||
|
ip nat inside source list 1 interface e0/0 overload
|
||||||
|
do wr
|
||||||
|
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
show ip route
|
||||||
31
auxilary/mikrotik_commands_backup.sh
Normal file
31
auxilary/mikrotik_commands_backup.sh
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/interface print
|
||||||
|
/ip address add interface=ether1 address=10.20.200.2/30
|
||||||
|
/ip address add interface=ether1 address=10.20.200.2/30
|
||||||
|
/ip address add interface=ether1 address=10.20.200.2/30
|
||||||
|
|
||||||
|
/ip route add dst-address=0.0.0.0/0 gateway=10.20.200.1
|
||||||
|
|
||||||
|
/interface bridge add name=loopback
|
||||||
|
/ip address add address=10.20.255.1/32 interface=loopback
|
||||||
|
|
||||||
|
routing ospf instance add name=kulesh router-id=10.20.255.1
|
||||||
|
routing ospf area add name=backbone area-id=0.0.0.0 instance=kulesh
|
||||||
|
|
||||||
|
/routing ospf interface-template
|
||||||
|
add networks=10.20.200.0/30 area=backbone
|
||||||
|
add networks=10.20.10.0/24 area=backbone
|
||||||
|
add networks=10.20.20.0/24 area=backbone
|
||||||
|
|
||||||
|
/interface vlan add name=kulesh-vlan10 interface=ether2 vlan-id=10
|
||||||
|
/interface vlan add name=kulesh-vlan20 interface=ether2 vlan-id=20
|
||||||
|
/interface vlan enable kulesh-vlan10
|
||||||
|
/interface vlan enable kulesh-vlan20
|
||||||
|
/ip address
|
||||||
|
add address=10.20.10.1/24 interface=kulesh-vlan10
|
||||||
|
add address=10.20.20.1/24 interface=kulesh-vlan20
|
||||||
|
|
||||||
|
/ip dhcp-relay
|
||||||
|
add name=kulesh-relay-vlan10 interface=kulesh-vlan10 dhcp-server=10.20.0.254
|
||||||
|
add name=kulesh-relay-vlan20 interface=kulesh-vlan20 dhcp-server=10.20.0.254
|
||||||
|
/ip dhcp-relay enable kulesh-relay-vlan10
|
||||||
|
/ip dhcp-relay enable kulesh-relay-vlan20
|
||||||
62
auxilary/script-task.sh
Executable file
62
auxilary/script-task.sh
Executable file
@@ -0,0 +1,62 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
show_menu() {
|
||||||
|
echo "=========Select A Number=========="
|
||||||
|
echo "1. User and OS Information"
|
||||||
|
echo "2. Home directory file list"
|
||||||
|
echo "3. Create file with specified permissions"
|
||||||
|
echo "4. Ping resource (3 packets)"
|
||||||
|
echo "5. Exit"
|
||||||
|
echo "=================================="
|
||||||
|
}
|
||||||
|
|
||||||
|
sysinfo() {
|
||||||
|
echo "Current user: $(whoami)"
|
||||||
|
echo "Home directory: $HOME"
|
||||||
|
echo "UID: $(id -u)"
|
||||||
|
echo "GID: $(id -g)"
|
||||||
|
echo ""
|
||||||
|
echo "OS Information:"
|
||||||
|
if [ -f /etc/os-release ]; then
|
||||||
|
. /etc/os-release
|
||||||
|
echo "OS Name: $NAME"
|
||||||
|
echo "Version: $VERSION"
|
||||||
|
else
|
||||||
|
echo "OS: $(uname -s)"
|
||||||
|
echo "Kernel version: $(uname -r)"
|
||||||
|
fi
|
||||||
|
echo "Architecture: $(uname -m)"
|
||||||
|
}
|
||||||
|
|
||||||
|
lshome() {
|
||||||
|
echo "Directory: $HOME"
|
||||||
|
ls -la "$HOME"
|
||||||
|
}
|
||||||
|
|
||||||
|
create_file() {
|
||||||
|
read -p "Enter full path to file: " file_path
|
||||||
|
read -p "Enter permissions (e.g., 755): " permissions
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$file_path")"
|
||||||
|
touch "$file_path"
|
||||||
|
chmod "$permissions" "$file_path"
|
||||||
|
ls -l "$file_path"
|
||||||
|
}
|
||||||
|
|
||||||
|
ping_resource() {
|
||||||
|
read -p "Enter address to ping: " address
|
||||||
|
ping -c 3 "$address"
|
||||||
|
}
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
show_menu
|
||||||
|
read -p "Select menu item (1-5): " choice
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
1) sysinfo ;;
|
||||||
|
2) lshome ;;
|
||||||
|
3) create_file ;;
|
||||||
|
4) ping_resource ;;
|
||||||
|
5) exit 0 ;;
|
||||||
|
*) echo "Invalid choice." ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
37
auxilary/switch_2_commands_backup.sh
Normal file
37
auxilary/switch_2_commands_backup.sh
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
|
||||||
|
en
|
||||||
|
conf t
|
||||||
|
|
||||||
|
vlan 10
|
||||||
|
name kulesh-vlan10
|
||||||
|
|
||||||
|
vlan 20
|
||||||
|
name kulesh-vlan20
|
||||||
|
|
||||||
|
int e0/0
|
||||||
|
switchport trunk encapsulation dot1q
|
||||||
|
switchport mode trunk
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
int e1/0
|
||||||
|
switchport mode access
|
||||||
|
switchport access vlan 10
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
int e0/1
|
||||||
|
switchport mode access
|
||||||
|
switchport access vlan 10
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
int e0/3
|
||||||
|
switchport mode access
|
||||||
|
switchport access vlan 20
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
int e0/2
|
||||||
|
switchport mode access
|
||||||
|
switchport access vlan 20
|
||||||
|
no shutdown
|
||||||
|
|
||||||
|
do wr
|
||||||
|
exit
|
||||||
Reference in New Issue
Block a user