notes
This commit is contained in:
parent
e06c62139a
commit
adee128e51
9
multipass.md
Normal file
9
multipass.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
mutlipass - ubuntu vm's from canonical
|
||||||
|
|
||||||
|
snap install multipass --classic (apparently this option is required and allows the snap to violate it's sandbox??)
|
||||||
|
|
||||||
|
https://multipass.run/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
32
pghero.md
Normal file
32
pghero.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
https://github.com/ankane/pghero/blob/master/guides/Linux.md
|
||||||
|
|
||||||
|
get:
|
||||||
|
```
|
||||||
|
wget -qO- https://dl.packager.io/srv/pghero/pghero/key | sudo apt-key add -
|
||||||
|
sudo wget -O /etc/apt/sources.list.d/pghero.list \
|
||||||
|
https://dl.packager.io/srv/pghero/pghero/master/installer/ubuntu/18.04.repo
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install pghero
|
||||||
|
```
|
||||||
|
|
||||||
|
Add your database. (use \ to escape special passw chars)
|
||||||
|
```
|
||||||
|
sudo pghero config:set DATABASE_URL=postgres://user:password@hostname:5432/dbname
|
||||||
|
```
|
||||||
|
|
||||||
|
And optional authentication.
|
||||||
|
```
|
||||||
|
sudo pghero config:set PGHERO_USERNAME=link
|
||||||
|
sudo pghero config:set PGHERO_PASSWORD=hyrule
|
||||||
|
```
|
||||||
|
|
||||||
|
Start the server
|
||||||
|
```
|
||||||
|
sudo pghero config:set PORT=3001
|
||||||
|
sudo pghero config:set RAILS_LOG_TO_STDOUT=disabled
|
||||||
|
sudo pghero scale web=1
|
||||||
|
```
|
||||||
|
|
||||||
|
Confirm it’s running with:
|
||||||
|
|
||||||
|
`curl -v http://localhost:3001/`
|
43
ufw.md
Normal file
43
ufw.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
if you dont specify a protocol it allows either tcp/udp
|
||||||
|
|
||||||
|
**ports**
|
||||||
|
```
|
||||||
|
sudo ufw allow 22
|
||||||
|
sudo ufw allow 22/tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
**ranges**
|
||||||
|
```
|
||||||
|
sudo ufw allow 6000:6007/tcp
|
||||||
|
sudo ufw allow 6000:6007/udp
|
||||||
|
```
|
||||||
|
|
||||||
|
**specific ip**
|
||||||
|
```
|
||||||
|
sudo ufw allow from 203.0.113.4
|
||||||
|
sudo ufw allow from 203.0.113.4 to any port 22
|
||||||
|
```
|
||||||
|
|
||||||
|
enable firewall `suod ufw enable`
|
||||||
|
|
||||||
|
|
||||||
|
## inquirey
|
||||||
|
`sudo ufw status numbered`
|
||||||
|
pt@r710:~$ sudo ufw status numbered
|
||||||
|
Status: active
|
||||||
|
|
||||||
|
To Action From
|
||||||
|
-- ------ ----
|
||||||
|
[ 1] 22/tcp ALLOW IN Anywhere
|
||||||
|
[ 2] 5432 ALLOW IN Anywhere
|
||||||
|
[ 3] 5440 ALLOW IN Anywhere
|
||||||
|
[ 4] 10000 ALLOW IN Anywhere
|
||||||
|
[ 5] 443/tcp ALLOW IN Anywhere
|
||||||
|
[ 6] 5433/tcp ALLOW IN Anywhere
|
||||||
|
[ 7] 22/tcp (v6) ALLOW IN Anywhere (v6)
|
||||||
|
[ 8] 5432 (v6) ALLOW IN Anywhere (v6)
|
||||||
|
[ 9] 5440 (v6) ALLOW IN Anywhere (v6)
|
||||||
|
[10] 10000 (v6) ALLOW IN Anywhere (v6)
|
||||||
|
[11] 443/tcp (v6) ALLOW IN Anywhere (v6)
|
||||||
|
[12] 5433/tcp (v6) ALLOW IN Anywhere (v6)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user