Klient lze v Debianu spustit pomocí
/opt/forticlient-sslvpn/fortisslvpn.sh
A opravdu funguje !!!
/opt/forticlient-sslvpn/fortisslvpn.sh
openssl genrsa -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
openssl genrsa -out device.key 2048
openssl req -new -key device.key -out device.csr
openssl x509 -req -in device.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out device.crt -days 500 -sha256
Zdroj
server {
listen 80;
listen [::]:80;
server_name site.cz;
location ~ /.well-known {
allow all;
}
access_log /var/log/nginx/site.cz.access.log;
error_log /var/log/nginx/site.cz.error.log;
server_name www.site.cz site.cz;
set $script_name $fastcgi_script_name;
set $fcgi_php unix:/var/run/php5-fpm.sock;
root /var/www/oxid4;
index index.php index.html;
if ($request_method ~ ^(TRACE|TRACK)$ ) {
return 403;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ (/\.|EXCEPTION_LOG\.txt|\.log$|\.tpl$|pkg.rev) {
deny all;
}
location ~ /out/pictures/.*(\.jpg|\.gif|\.png)$ {
try_files $uri /getimg.php;
}
location ~ ^/(admin|setup)/?$ {
}
location ~ /(core|export|modules|out|tmp|views)/ {
}
location = /oxseo.php {
if ($args ~ "mod_rewrite_module_is=off") {
rewrite /oxseo.php /oxseo.php?mod_rewrite_module_is=on? break;
}
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params.oxid;
fastcgi_pass $fcgi_php;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params.oxid;
fastcgi_pass $fcgi_php;
}
location / {
fastcgi_index index.php;
set $script_name $fastcgi_script_name;
if (!-e $request_filename) {
set $script_name /oxseo.php;
fastcgi_pass $fcgi_php;
}
include fastcgi_params.oxid;
}
}
# Default server configuration
#
server {
# SSL configuration
#
listen 443 ssl ;
listen [::]:443 ssl ;
access_log /var/log/nginx/site.cz.access.log;
error_log /var/log/nginx/site.cz.error.log;
server_name www.site.cz site.cz;
set $script_name $fastcgi_script_name;
set $fcgi_php unix:/var/run/php5-fpm.sock;
root /var/www/oxid4;
index index.php index.html;
if ($request_method ~ ^(TRACE|TRACK)$ ) {
return 403;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ (/\.|EXCEPTION_LOG\.txt|\.log$|\.tpl$|pkg.rev) {
deny all;
}
location ~ /out/pictures/.*(\.jpg|\.gif|\.png)$ {
try_files $uri /getimg.php;
}
location ~ ^/(admin|setup)/?$ {
}
location ~ /(core|export|modules|out|tmp|views)/ {
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params.oxid;
fastcgi_pass $fcgi_php;
}
location / {
fastcgi_index index.php;
set $script_name $fastcgi_script_name;
if (!-e $request_filename) {
set $script_name /oxseo.php;
fastcgi_pass $fcgi_php;
}
include fastcgi_params.oxid;
}
location ^~ /redmine/ {
rewrite ^/redmine/(.*) http://redmine.site.cz/$1 permanent;
}
ssl_certificate /etc/letsencrypt/live/site/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/site/privkey.pem;
ssl_prefer_server_ciphers On;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
}
xset b 0 440 50
nmcli connection up <name>dostanete hlášku
Chyba: Selhala aktivace připojení: Could not find source connection.
vim /etc/NetworkManager/NetworkManager.conf
[ifupdown]
managed=true
#!/bin/sh
PORT=$1
readingThread() {
dd if=$PORT of=/root/dump.txt &
P=$!
sleep 10
kill -9 $P
}
writingThread() {
echo -en '/?!\x0d\x0a' > $PORT
sleep 1
echo -en '\x06030\x0d\x0a' > $PORT
}
setup() {
stty -F $PORT intr undef quit undef erase undef kill undef eof undef start undef stop undef susp undef rprnt undef werase undef lnext undef flush undef min 1 time 5 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
}
setup
readingThread &
sleep 1
writingThread
sleep 11
cat dump.txt | grep -e '1.8.L1' | sed -e 's/^.*(//' -e 's/[^0-9]//g'
./scripts/feeds update -a
./scripts/feeds install -a
make world
script/rails runner "Repository.fetch_changesets" -e productionv domovském adresáři redmine
$this->sShopURL = 'https://www.domain.com'; // eShop base url, requiredsites-enabled/domain.com - standartní instalace s ssl a přesměrováním
$this->sSSLShopURL = 'https://www.domain.com';
$this->sAdminSSLURL = null;
server {
listen 80;
server_name domain.com;
location ^~ /redmine/ {
rewrite ^/redmine/(.*) http://redmine.domain.com/$1 permanent;
}
location / {
rewrite ^ https://$server_name$request_uri? permanent;
}
}
server {
listen 443 ssl ;
listen [::]:443 ssl ;
server_name www.domain.com domain.com;
set $script_name $fastcgi_script_name;
set $fcgi_php unix:/var/run/php5-fpm.sock;
root /var/www/oxid4;
index index.php index.html;
if ($request_method ~ ^(TRACE|TRACK)$ ) {
return 403;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location ~ (/\.|EXCEPTION_LOG\.txt|\.log$|\.tpl$|pkg.rev) {
deny all;
}
location ~ /out/pictures/.*(\.jpg|\.gif|\.png)$ {
try_files $uri /core/utils/getimg.php;
}
location ~ ^/(admin|setup)/?$ {
}
location ~ /(core|export|modules|out|tmp|views)/ {
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
include fastcgi_params.oxid;
fastcgi_pass $fcgi_php;
}
location / {
fastcgi_index index.php;
set $script_name $fastcgi_script_name;
if (!-e $request_filename) {
set $script_name /oxseo.php;
fastcgi_pass $fcgi_php;
}
include fastcgi_params.oxid;
}
location ^~ /redmine/ {
rewrite ^/redmine/(.*) http://redmine.domain.com/$1 permanent;
}
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
ssl_prefer_server_ciphers On;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000";
}
server {
listen 80;
listen [::]:80;
server_name postfixadmin.domain.cz;
index index.php index.html index.htm;
root /usr/share/postfixadmin/;
access_log /var/log/nginx/postfixadmin_access.log;
error_log /var/log/nginx/postfixadmin_error.log;
location / {
try_files $uri $uri/ index.php;
index index.php;
}
location ~* \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
set $script_name $fastcgi_script_name;
set $fcgi_php unix:/var/run/php5-fpm.sock;
fastcgi_pass $fcgi_php;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
/etc/nginx/fastcgi_params
#fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
# Initialize the rails application
:shallow_path => '/redmine' }
RedmineApp::Application.routes.default_scope = { :path => '/', :shallow_path => '/' }
RedmineApp::Application.initialize!
# Tento prázdný řetězec je důležitý!!!
Redmine::Utils::relative_url_root = ''
server {
listen 80;
listen [::]:80;
server_name redmine.domain.com;
root /opt/redmine-2.6.6/public;
passenger_enabled on;
client_max_body_size 50m;
location / {
root /opt/redmine-2.6.6/public/;
passenger_enabled on;
client_max_body_size 50m; # Max attachemnt size
}
}