Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gameauth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sucssite
gameauth
Compare revisions
ce68df8738b4bcbbdd6402e41d20c418c4860ad0 to c0a3e81b40bc2414dd3a4c5e04dbb3c62d7dc48b
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
sucssite/gameauth
Select target project
No results found
c0a3e81b40bc2414dd3a4c5e04dbb3c62d7dc48b
Select Git revision
Branches
master
Swap
Target
sucssite/gameauth
Select target project
sucssite/gameauth
ripp_/gameauth
2 results
ce68df8738b4bcbbdd6402e41d20c418c4860ad0
Select Git revision
Branches
master
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (3)
Added service file
· f8515810
Laurence Sebastian Bowes
authored
8 years ago
f8515810
Committed apache conf
· e867e810
Laurence Sebastian Bowes
authored
8 years ago
e867e810
Push up the actual firewall rules running on games...
· c0a3e81b
Imran Hussain
authored
8 years ago
c0a3e81b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
firewall.service
+10
-0
10 additions, 0 deletions
firewall.service
firewall.sh
+44
-13
44 additions, 13 deletions
firewall.sh
gameauth-apache.conf
+44
-0
44 additions, 0 deletions
gameauth-apache.conf
with
98 additions
and
13 deletions
firewall.service
0 → 100644
View file @
c0a3e81b
[Unit]
Description
=
Gameauth Firewall
[Service]
Type
=
oneshot
ExecStart
=
/var/www/gameauth/firewall.sh start
ExecStop
=
/var/www/gameauth/firewall.sh stop
[Install]
WantedBy
=
multi-user.target
This diff is collapsed.
Click to expand it.
firewall.sh
View file @
c0a3e81b
#!/bin/bash
### BEGIN INIT INFO
# Provides: games-firewall
# Required-Start: $network $syslog $remote_fs
# Required-Stop: $network $syslog $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Set firewall rules and clear games user table
# Description: Sets default INPUT policy to DROP and adds default
# rules for access from SUCS and for exposed services.
# Sets default INPUT policy to accept when stopped.
# The game server user table is purged when the firewall
# is started or stopped in order to ensure it reflects the
# current firewall state.
### END INIT INFO
start
(){
/sbin/iptables
-F
INPUT
/sbin/iptables
-P
INPUT DROP
/sbin/iptables
-A
INPUT
-i
lo
-j
ACCEPT
/sbin/iptables
-A
INPUT
-m
state
--state
ESTABLISHED
,RELATED
-j
ACCEPT
/sbin/iptables
-A
INPUT
-m
state
--state
RELATED,
ESTABLISHED
-j
ACCEPT
/sbin/iptables
-A
INPUT
-s
137.44.10.0/24
-j
ACCEPT
/sbin/iptables
-A
INPUT
-p
TCP
--dport
80
-j
ACCEPT
/sbin/iptables
-A
INPUT
-p
TCP
--dport
443
-j
ACCEPT
/
usr/local/src/gameauth/empty_users_table.py
/
var/www/gameauth/gameauth-task.php
}
stop
(){
/sbin/iptables
-F
INPUT
/sbin/iptables
-P
INPUT ACCEPT
/
usr/local/src/gameauth/empty_users_table.py
/
var/www/gameauth/gameauth-task.php
}
case
"
$1
"
in
start
)
start
;;
stop
)
stop
;;
*
)
echo
"Usage:
$0
{start|stop}"
exit
1
esac
start
)
echo
-n
"Starting firewall..."
start
echo
"done."
;;
stop
)
echo
-n
"Stopping firewall..."
stop
echo
"done."
;;
restart
)
echo
-n
"Restarting firewall..."
stop
start
echo
"done."
;;
force-reload
)
echo
-n
"Restarting firewall..."
stop
start
echo
"done."
;;
*
)
echo
"Usage:
$0
{start|stop|restart|force-reload}"
echo
"restart and force-reload are equivalent"
exit
1
esac
\ No newline at end of file
This diff is collapsed.
Click to expand it.
gameauth-apache.conf
0 → 100644
View file @
c0a3e81b
<
VirtualHost
*:
80
>
ServerAdmin
games
@
sucs
.
org
DocumentRoot
/
var
/
www
/
gameauth
ServerName
games
.
sucs
.
org
ServerAlias
www
.
games
.
sucs
.
org
CustomLog
/
var
/
log
/
apache2
/
gameauth_access
.
log
combined
ErrorLog
/
var
/
log
/
apache2
/
gameauth_error
.
log
AddHandler
application
/
x
-
httpd
-
php
.
php
RewriteEngine
on
ReWriteCond
%{
SERVER_PORT
} !^
443
$
RewriteRule
^/(.*)
https
://%{
HTTP_HOST
}/$
1
[
NC
,
R
,
L
]
Alias
/
dynmap
/
var
/
www
/
minecraft
-
dynmap
Alias
/
tekkit
-
dynmap
/
var
/
www
/
tekkit
-
dynmap
/
</
VirtualHost
>
<
VirtualHost
*:
443
>
ServerAdmin
games
@
sucs
.
org
DocumentRoot
/
var
/
www
/
gameauth
ServerName
games
.
sucs
.
org
ServerAlias
www
.
games
.
sucs
.
org
CustomLog
/
var
/
log
/
apache2
/
gameauth_access
.
log
combined
ErrorLog
/
var
/
log
/
apache2
/
gameauth_error
.
log
AddHandler
application
/
x
-
httpd
-
php
.
php
SSLEngine
on
SSLCipherSuite
AES128
+
EECDH
:
AES128
+
EDH
SSLProtocol
All
-
SSLv2
-
SSLv3
SSLHonorCipherOrder
On
Header
always
set
Strict
-
Transport
-
Security
"max-age=63072000; includeSubdomains; preload"
Header
always
set
X
-
Frame
-
Options
DENY
Header
always
set
X
-
Content
-
Type
-
Options
nosniff
SSLCompression
off
SSLCertificateFile
/
etc
/
letsencrypt
/
live
/
games
.
sucs
.
org
/
fullchain
.
pem
SSLCertificateKeyFile
/
etc
/
letsencrypt
/
live
/
games
.
sucs
.
org
/
privkey
.
pem
SSLCertificateChainFile
/
etc
/
letsencrypt
/
live
/
games
.
sucs
.
org
/
chain
.
pem
Alias
/
dynmap
/
var
/
www
/
minecraft
-
dynmap
Alias
/
tekkit
-
dynmap
/
var
/
www
/
tekkit
-
dynmap
/
</
VirtualHost
>
This diff is collapsed.
Click to expand it.