Compare commits
8 Commits
mdwiki
...
7419e0b0e7
Author | SHA1 | Date | |
---|---|---|---|
7419e0b0e7 | |||
f884fd2ed1 | |||
94995a401d | |||
f8e22b9924 | |||
10049a6f69 | |||
fc632bfa17
|
|||
f483a7682e | |||
7c9392d4d7
|
@ -8,7 +8,7 @@ RUN \
|
||||
chown -R nobody:nobody /var/cache/nginx /var/log/nginx && \
|
||||
sed -i 's/listen\s\+80;/listen 8080;/' /etc/nginx/conf.d/default.conf && \
|
||||
sed -i 's/index index.html index.htm;/index mdwiki.html;/' /etc/nginx/conf.d/default.conf && \
|
||||
sed -i 's,pid\s\+/var/run/nginx.pid;,pid /tmp/nginx.pid;,' /etc/nginx/nginx.conf
|
||||
sed -i 's,pid\s\+/run/nginx.pid;,pid /tmp/nginx.pid;,' /etc/nginx/nginx.conf
|
||||
USER nobody
|
||||
# ------------
|
||||
EXPOSE 8080
|
||||
|
@ -11,6 +11,5 @@
|
||||
* [`082071E0415E0A2D87A2385B5159E88B93B67538`](/static/082071E0415E0A2D87A2385B5159E88B93B67538.txt)
|
||||
* [`7B5C0BB6AFCADDC8E3435746B76E53073EE19643`](/static/7B5C0BB6AFCADDC8E3435746B76E53073EE19643.txt)
|
||||
* [`90E1D1E935FC6AB94444B15B18FDFA577A8871AD`](/static/90E1D1E935FC6AB94444B15B18FDFA577A8871AD.txt)
|
||||
* [`BDB9F424842252FB4D8EEDDCE49AF3B9EF6DD469`](/static/BDB9F424842252FB4D8EEDDCE49AF3B9EF6DD469.txt)
|
||||
|
||||
|
||||
* [`BDB9F424842252FB4D8EEDDCE49AF3B9EF6DD469`](/static/BDB9F424842252FB4D8EEDDCE49AF3B9EF6DD469.txt) (Dell Laptop, USB-A nano)
|
||||
* [`F53691B26F457823DF3E954BB3E461281CF3CE5D`](/static/F53691B26F457823DF3E954BB3E461281CF3CE5D.txt) (Keychain, USB-C)
|
||||
|
@ -5,6 +5,14 @@ date: 2025-04-17
|
||||
|
||||
# Administring a Cisco Switch - Basics for the Homelab Usage
|
||||
|
||||
## Connecting to the Switch
|
||||
|
||||
Only quite old ssh parameters are supported:
|
||||
|
||||
```
|
||||
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa admin@192.168.2.1
|
||||
```
|
||||
|
||||
## Saving the Configuration
|
||||
|
||||
Never forget, otherwise after reboot changes are gone!
|
||||
@ -33,19 +41,39 @@ exit
|
||||
exit
|
||||
```
|
||||
|
||||
The first `exit` leaves the interface, the second `exit` leaves the config session.
|
||||
The first `exit` leaves the VLAN, the second `exit` leaves the config session.
|
||||
|
||||
If the VLAN should be used for management purposes it needs an IP address:
|
||||
If the VLAN should be used for management purposes additionally an interface for this VLAN is required with an IP address:
|
||||
|
||||
```
|
||||
configure terminal
|
||||
vlan 2000
|
||||
name vlan2000
|
||||
exit
|
||||
|
||||
interface vlan 2000
|
||||
ip address dhcp
|
||||
exit
|
||||
|
||||
exit
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
configure terminal
|
||||
vlan 2000
|
||||
name vlan2000
|
||||
exit
|
||||
|
||||
interface vlan 2000
|
||||
ip address 192.168.88.3 255.255.255.0
|
||||
exit
|
||||
|
||||
ip default-gateway 192.168.88.1
|
||||
|
||||
exit
|
||||
```
|
||||
|
||||
Check your work:
|
||||
|
||||
@ -94,3 +122,56 @@ exit
|
||||
`native` makes the VLAN untagged on that port.
|
||||
|
||||
|
||||
### SSH access and hardening measures
|
||||
|
||||
First of all, the switch needs to know about time and requires a name:
|
||||
|
||||
About time:
|
||||
```
|
||||
configure terminal
|
||||
ntp server de.pool.ntp.org
|
||||
clock timezone Etc/Utc
|
||||
exit
|
||||
```
|
||||
|
||||
About names:
|
||||
```
|
||||
configure terminal
|
||||
hostname switch01
|
||||
ip domain-name mynetwork.intern
|
||||
exit
|
||||
```
|
||||
|
||||
An user is required:
|
||||
```
|
||||
configure terminal
|
||||
username admin password geheim123
|
||||
exit
|
||||
```
|
||||
|
||||
A host key must be generated:
|
||||
```
|
||||
crypto key generate rsa
|
||||
```
|
||||
This command will ask for the key length. Select 2048 bits.
|
||||
|
||||
Set the SSH version:
|
||||
```
|
||||
ip ssh version 2
|
||||
```
|
||||
|
||||
Configure the virtual terminals accordingly:
|
||||
```
|
||||
configure terminal
|
||||
line vty 0 15
|
||||
transport input ssh
|
||||
login local
|
||||
exit
|
||||
```
|
||||
|
||||
As mentioned about, the switches support only quite old SSH protocols, so to access it use on the client side:
|
||||
```
|
||||
ssh -oKexAlgorithms=+diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-rsa admin@192.168.2.1
|
||||
```
|
||||
|
||||
|
||||
|
73
content/snippets/0270-docker-on-apple-silicon.md
Normal file
73
content/snippets/0270-docker-on-apple-silicon.md
Normal file
@ -0,0 +1,73 @@
|
||||
<!--
|
||||
title: Docker on Apple Silicon
|
||||
date: 2025-05-12
|
||||
-->
|
||||
|
||||
# Docker on Apple Silicon - without longrunning background processes and without Rosetta
|
||||
|
||||
Docker itself comes with some background processes. Fine for servers, which only exists to run the containers all the time, disadvantageous for a laptop where you run a container only now and then. ChatGPT proposed `podman` and `finch` and as I already heard and read about `podman` I tried it first.
|
||||
|
||||
## podman
|
||||
|
||||
```
|
||||
brew install podman
|
||||
```
|
||||
|
||||
Afterwards,
|
||||
|
||||
```
|
||||
podman machine init
|
||||
podman machine start
|
||||
```
|
||||
|
||||
is required to start a VM to run containers within. However,, while the init command directly worked, when issueing the start command I was demanded to install Rosetta. I don't want.
|
||||
|
||||
So
|
||||
|
||||
```
|
||||
podman machine rm
|
||||
brew uninstall podman
|
||||
```
|
||||
|
||||
|
||||
## finch
|
||||
|
||||
This is a open source product of AWS: [https://aws.amazon.com/de/blogs/opensource/introducing-finch-an-open-source-client-for-container-development/](https://aws.amazon.com/de/blogs/opensource/introducing-finch-an-open-source-client-for-container-development/).
|
||||
|
||||
```
|
||||
brew install finch
|
||||
```
|
||||
|
||||
Here also
|
||||
|
||||
```
|
||||
finch vm init
|
||||
finch vm stop
|
||||
```
|
||||
|
||||
is required and afterwards containers can be executed:
|
||||
|
||||
```
|
||||
finch run -it ubuntu bash
|
||||
```
|
||||
|
||||
It appears, that the commandline interface of `finch` it compatible with the one of `docker`, at least I haven't found any flaws yet. Since, I usually have full docker commandline in my notes I created an alias:
|
||||
|
||||
```
|
||||
alias docker="echo -e '\033[1;31m>>> REMEMBER: docker is finch here <<<\033[0m' && finch"
|
||||
```
|
||||
|
||||
Using this alias (I've it in my `.bashrc`) I can call `docker` and `finch` is executed, with a big reminder that it actually is `finch`.
|
||||
|
||||
As soon as I don't need to run containers anymore, I can call
|
||||
|
||||
```
|
||||
finch vm stop
|
||||
```
|
||||
|
||||
and no process remains running. Fine.
|
||||
|
||||
|
||||
|
||||
|
||||
|
18
content/static/F53691B26F457823DF3E954BB3E461281CF3CE5D.txt
Normal file
18
content/static/F53691B26F457823DF3E954BB3E461281CF3CE5D.txt
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mDMEZ+PYvBYJKwYBBAHaRw8BAQdAny08AcNHckbQ9+4yeP96NingMGoAnEFv//D7
|
||||
38R0aI+0JVdvbGZnYW5nIEhvdHRnZW5yb3RoIDx3b2hvQGhvdHRpcy5kZT6IkwQT
|
||||
FgoAOxYhBPU2kbJvRXgj3z6VS7PkYSgc885dBQJn49i8AhsDBQsJCAcCAiICBhUK
|
||||
CQgLAgQWAgMBAh4HAheAAAoJELPkYSgc885duXMBAOljrLHAVWR2M/4d7XiTYEDR
|
||||
LxyXkv0I3pKWyWf0+lKBAP9Nnlwqyi9IZGJgg4KDCDrvmwBWT/cs0AMzZyTo0IGS
|
||||
DrgzBGfj2LwWCSsGAQQB2kcPAQEHQPJB1WXrw8nMK+L09KAoDVZQ7t5UzLII1+6h
|
||||
xXDQnBh0iHgEGBYKACAWIQT1NpGyb0V4I98+lUuz5GEoHPPOXQUCZ+PYvAIbIAAK
|
||||
CRCz5GEoHPPOXbPHAQD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UNswxe6SpAPw6SuKaMY/zL7as2qYpBsFdrr1oyKbgZMI2yPRJloJjklqlznJcUC4SzEaxtVSnZRIUdx3ANLzt5xNxWhYZ7048oGen4cRfiOtiTypW5uAOwovQulJVtpavo2GTD9sSpnFF9UQhgRkqT+oFRgHQnnOHUqazLsc4uRv0h6/6wSBl9SkKys33x0Zxl1zpxM+0iJDFVnn8HnXLvuRLMCXAg9QWCmKkrQJ/SFU213Qg21O62Nbet6bRfFGz+uz0+9GeMaARmhPbxEGEgqBrscaadeO+JRWntEcoULupKsU0Mc77/DX3UfEYGUgvA8FIFTgpiPnOuGI2K/6kP/QLMqZzLXRAgYO4U+vyOniPy9kHadQ9ZEuCX5inhZhOFi5v/ofI7532skXktbbm1ue46j+7xGHSVcoeuz02dZNtnLZP36vCCi8UkE3CAvuU0hLa/ZBeos6M3GNogdIQ+pzesZ6htQhZcGUR7XHmrFLDwAwV4JTJUfXZ5nMwm78+Oh1CptLyH7Ww4z/k3an8caggxP2+QQ== openpgp:0xCD137F0B
|
||||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPJB1WXrw8nMK+L09KAoDVZQ7t5UzLII1+6hxXDQnBh0 openpgp:0x27A0A980
|
||||
|
Reference in New Issue
Block a user