sudo apt-get install open-iscsi
vi /etc/iscsi/iscsid.conf
deb http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse | |
deb http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse | |
deb http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse | |
deb http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse | |
deb http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse | |
deb-src http://mirrors.163.com/ubuntu/ xenial main restricted universe multiverse | |
deb-src http://mirrors.163.com/ubuntu/ xenial-security main restricted universe multiverse | |
deb-src http://mirrors.163.com/ubuntu/ xenial-updates main restricted universe multiverse | |
deb-src http://mirrors.163.com/ubuntu/ xenial-proposed main restricted universe multiverse | |
deb-src http://mirrors.163.com/ubuntu/ xenial-backports main restricted universe multiverse |
dest root / | |
dest ram /tmp | |
lists_dir ext /var/opkg-lists | |
option overlay_root /overlay | |
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/base | |
src/gz chaos_calmer_luci http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/luci | |
src/gz chaos_calmer_packages http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/packages | |
src/gz chaos_calmer_routing http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/routing | |
src/gz chaos_calmer_telephony http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/telephony | |
src/gz chaos_calmer_management http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/management |
dest root / | |
dest ram /tmp | |
lists_dir ext /var/opkg-lists | |
option overlay_root /overlay | |
src/gz chaos_calmer_base http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/base | |
src/gz chaos_calmer_luci http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/luci | |
src/gz chaos_calmer_packages http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/packages | |
src/gz chaos_calmer_routing http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/routing | |
src/gz chaos_calmer_telephony http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/telephony | |
src/gz chaos_calmer_management http://downloads.openwrt.org/chaos_calmer/15.05/x86/64/packages/management |
sudo add-apt-repository ppa:mc3man/trusty-media | |
sudo apt-get update | |
sudo apt-get install ffmpeg |
/ip pool | |
add name=vpn-pool ranges=10.2.2.2-10.2.2.22 | |
/ppp profile | |
set [find name=default-encryption] dns-server=10.2.2.1 local-address=10.2.2.1 remote-address=vpn-pool | |
/ppp secret | |
add name=帳號 password=密碼 profile=default | |
/interface l2tp-server server |
program=$1; | |
tmp=$(mktemp); | |
readelf -s $program | awk ' | |
{ | |
if($4 == "FUNC" && $2 != 0) { | |
print "# code for " $NF; | |
print "b *0x" $2; | |
print "commands"; | |
print "silent"; | |
print "bt 1"; |
/etc/vpnc/post-connect.d/enable-ping.sh | |
--------------------------------------- | |
#!/bin/bash | |
echo "Connected."; | |
# enable host ping | |
while [ ! -z "$(iptables -L | grep icmp-net-unreachable)" ]; do | |
echo "==> delete icmp-net-unreachable"; | |
iptables -D INPUT -p icmp -m icmp --icmp-type echo-request -j REJECT --reject-with icmp-net-unreachable; | |
done |
# put this in your bash profile (change the line below if you use .bash_profile) | |
# refresh profile on USR1 signal | |
trap 'eval $(PATH= /usr/libexec/path_helper -s) && source ~/.profile' USR1 | |
# send USR1 signal to all bash instances | |
reload_profile() { | |
ps -xo pid,command | grep ' \-bash' | awk '{print $1}' | while read pid; do | |
kill -USR1 $pid | |
done |
sudo apt-get install network-manager-openconnect openconnect |