Skip to content

Commit

Permalink
contrib/ folder with more usefull info for setting server
Browse files Browse the repository at this point in the history
  • Loading branch information
vodolaz095 committed Aug 11, 2015
1 parent 4891711 commit 96f440e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .gitignore

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# v 1.1.0
Tons of fixes, console interface is refactored. Console commands of `gossha list`,`gossha log`,`gossha dumpcfg` are added.
Tons of smallfixes, console interface is refactored. Console commands of `gossha list`,`gossha log`,`gossha dumpcfg` are added.
More verbose error reporter with link to bug-tracker.

# v 1.0.4
Newer crypto and gorm libs. More standart and automated `Makefile` behaviour. Readme updated.
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ check: deps

build: clean engrave deps check
go build -o "build/gossha" app/gossha.go
git checkout ver.go

dist: build
zip $(archiv).zip build/gossha README.md README_RU.md CHANGELOG.md homedir/ systemd/ -r
tar -czvf $(archiv).tar.gz build/gossha README.md README_RU.md CHANGELOG.md homedir/ systemd/
tar -cjvf $(archiv).tar.bz2 build/gossha README.md README_RU.md CHANGELOG.md homedir/ systemd/
zip $(archiv).zip build/gossha README.md README_RU.md CHANGELOG.md homedir/ contrib/ -r
tar -czvf $(archiv).tar.gz build/gossha README.md README_RU.md CHANGELOG.md homedir/ contrib/
tar -cjvf $(archiv).tar.bz2 build/gossha README.md README_RU.md CHANGELOG.md homedir/ contrib/


sign:
Expand Down
32 changes: 32 additions & 0 deletions contrib/firewall.sh
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
6 changes: 4 additions & 2 deletions systemd/gossha@.service → contrib/systemd/gossha@.service
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

0 comments on commit 96f440e

Please sign in to comment.