UFW and Startup
parent
4647c1f2b5
commit
b48749cc93
24
linux.md
24
linux.md
|
@ -1,5 +1,11 @@
|
|||
# Linux Cheats
|
||||
|
||||
## Set script as startup
|
||||
If, for some reason, apache isn't startup:
|
||||
|
||||
> `sudo update-rc.d apache2 defaults`
|
||||
|
||||
|
||||
## Arduino
|
||||
Find what 'channel'(?) the Arduino is plugged in at:
|
||||
`dmesg | grep tty`
|
||||
|
@ -26,3 +32,21 @@ Create groups
|
|||
|
||||
Add user to a group
|
||||
> `usermod -a -G <group> <user>`
|
||||
|
||||
## Open ports with iptables
|
||||
|
||||
Don't do that. Use [UFW](https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-debian-10) instead.
|
||||
|
||||
Allow a connection with UFW:
|
||||
> `sudo ufw allow <port/service>`
|
||||
|
||||
Enable ufw service:
|
||||
|
||||
> `sudo ufw enable`
|
||||
|
||||
|
||||
|
||||
> [Source](https://www.linuxquestions.org/questions/linux-security-4/how-to-open-ports-with-iptables-237939/)
|
||||
>
|
||||
> [Source2](https://www.digitalocean.com/community/tutorials/iptables-essentials-common-firewall-rules-and-commands)
|
||||
|
||||
|
|
Loading…
Reference in New Issue