-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib/
folder with more usefull info for setting server
- Loading branch information
1 parent
4891711
commit 96f440e
Showing
5 changed files
with
42 additions
and
8 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
#Official script to set up firewall properly with GoSSHa SSH chat | ||
#(c) Ostroumov Anatolij | ||
# https://github.com/vodolaz095/gossha | ||
|
||
|
||
#drop all rules | ||
iptables -F | ||
|
||
#basic anti ddos | ||
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP | ||
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP | ||
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP | ||
|
||
#accept established connections | ||
iptables -A INPUT -p ALL -m state --state ESTABLISHED,RELATED -j ACCEPT | ||
|
||
#to access localhost | ||
iptables -A INPUT -i lo -j ACCEPT | ||
|
||
#open for ssh server | ||
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | ||
|
||
#open for GoSSHa server | ||
iptables -A INPUT -p tcp -m tcp --dport 27015 -j ACCEPT | ||
|
||
#allow sending anything | ||
iptables -P OUTPUT ACCEPT | ||
|
||
#do no accept other incoming transmissions | ||
iptables -P INPUT DROP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
[Unit] | ||
Description=goSSHa for %i | ||
Description=Secure SSH based chat for %i | ||
Wants=network.target | ||
After=network.target | ||
|
||
[Service] | ||
ProtectSystem=true | ||
Type=simple | ||
User=%i | ||
ExecStart=/usr/bin/gossha | ||
Restart=always | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
|