Skip to content

Instantly share code, notes, and snippets.

@whoamiTM
whoamiTM / softether client ubuntu
Last active July 4, 2022 18:07 — forked from legokichi/vpnclient
softether vpn client for ubuntu /etc/init.d/vpnclient
#! /bin/sh
### BEGIN INIT INFO
# Provides: vpnclient
# Required-Start: $all
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# chkconfig: 345 44 56
# description: Start VPN Client at boot time.
# processname: vpnclient
@whoamiTM
whoamiTM / noip2
Last active August 29, 2017 01:33
noip2 for debian /etc/init.d/noip2
#! /bin/sh
### BEGIN INIT INFO
# Provides: noip2
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start noip2 at boot time
# Processname: noip2
### END INIT INFO
@whoamiTM
whoamiTM / vpnserver.sh
Last active August 7, 2018 03:28
SoftEther VPN Server init | Linux | /etc/init.d/vpnserver
#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: SoftEther VPN Server
### END INIT INFO
@whoamiTM
whoamiTM / vpnclient.sh
Last active October 9, 2018 15:24
SoftEther Client init & Auto Routing Config | ChromeOS | etc/init.d/vpnclient
#! /bin/sh
#######################################################
### SoftEther Client
#######################################################
### BEGIN INIT INFO
# Provides: vpnclient
# Required-Start: $all
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@whoamiTM
whoamiTM / softether.fw
Last active January 27, 2023 07:31
Firewall Rules For IPv4 SoftEther VPN Server
#!/bin/bash
#
#######################################################################
# iptables rules
#######################################################################
#
# Flush current V4 polices
iptables -t nat -F
iptables -t mangle -F
iptables -F
@whoamiTM
whoamiTM / killswitch.bat
Last active December 3, 2021 22:09
VPN Kill Switch For Windows | Terminal User Interface | route.exe
@echo off
:: GetAdmin
:-------------------------------------
:: Verify permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
:: On Error No Admin
if '%errorlevel%' NEQ '0' (
echo Getting administrative privileges...
@whoamiTM
whoamiTM / killswitch.command
Last active August 7, 2018 03:21
VPN Kill Switch For MacOS |Terminal User Interface | Route(8)
#! /bin/bash
echo off
defgw=$(route get 0.0.0.0 2>/dev/null | awk '/gateway: / {print $2}';)
def_int=$(route get 0.0.0.0 2>/dev/null | awk '/interface: / {print $2}';)
clear
:start
clear
@whoamiTM
whoamiTM / killswitch.pf.config
Last active August 7, 2018 03:24
PF Firewall Rules For MacOS | VPN Kill Switch | Use with killswitch.pf.command | mv killswitch.pf.conf ~/Documents/
int_en1 = "en0"
vpn_utun1 = "tap0"
vpn_ip = "55.55.55.55"
set block-policy drop
set ruleset-optimization basic
set skip on lo0
block all
block out inet6
@whoamiTM
whoamiTM / iptables_killswitch.sh
Last active October 3, 2018 02:06
VPN Kill Switch | ChromeOS or Linux | .sh or command line syntax
#! /bin/bash
#########################################################################
##### VPN Kill Switch Linux
#########################################################################
#
# Set Varibles
vpn_ip=55.55.55.55
vpn_interface=tun0
#
sudo iptables -F
@whoamiTM
whoamiTM / killswitch.pf.command
Last active August 7, 2018 03:25
VPN Kill Switch For Mac OS | Terminal User Interface | Requires killswitch.pf.conf
#! /bin/bash
echo off
defgw=$(route get 0.0.0.0 2>/dev/null | awk '/gateway: / {print $2}';)
def_int=$(route get 0.0.0.0 2>/dev/null | awk '/interface: / {print $2}';)
clear
:start
clear