auto eth1.6
iface eth1.6 inet dhcp
vlan-raw-device eth1
#iface eth1.6 inet static
#address 192.168.1.254
#netmask 255.255.255.0
#broadcast 192.168.1.255
2019年12月31日 星期二
zebra + ripd shorewall 設定
/etc/shorewall/rule 加入
ACCEPT fw loc igmp
ACCEPT loc fw igmp
ACCEPT fw loc udp
ACCEPT loc fw tcp 2601
ACCEPT loc fw tcp 2602
ACCEPT fw loc igmp
ACCEPT loc fw igmp
ACCEPT fw loc udp
ACCEPT loc fw tcp 2601
ACCEPT loc fw tcp 2602
wget 下載 Google Drive 檔案
f=filename
id=1234567567567
url="https://docs.google.com/uc?export=download&id=${id}";
cookies=$(mktemp);
x=$(wget -q --save-cookies $cookies --keep-session-cookies --no-check-certificate $url -O-);
url2=https://docs.google.com$(echo $x|grep -Po 'uc-download-link" [^>]* href="\K[^"]*' | sed 's/\&/\&/g');
wget --load-cookies $cookies $url2 -O "$f";
id=1234567567567
url="https://docs.google.com/uc?export=download&id=${id}";
cookies=$(mktemp);
x=$(wget -q --save-cookies $cookies --keep-session-cookies --no-check-certificate $url -O-);
url2=https://docs.google.com$(echo $x|grep -Po 'uc-download-link" [^>]* href="\K[^"]*' | sed 's/\&/\&/g');
wget --load-cookies $cookies $url2 -O "$f";
2019年12月25日 星期三
Linux: Kerberos authentification against Windows Active Directory
修改 /etc/krb5.conf 內容
[libdefaults]
default_realm = domainname.local
default_tgs_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5
default_tkt_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5
[libdefaults]
default_realm = domainname.local
default_tgs_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5
default_tkt_enctypes = arcfour-hmac-md5 des-cbc-crc des-cbc-md5
2019年12月18日 星期三
Debian 9 netinstall 支援 pxe + tftp 安裝
iso=debian-9.9.0-amd64-netinst.iso
odir=/root/o
mnt=$(mktemp -d);
mkdir ${mnt}/iso ${mnt}/initrd;
losetup /dev/loop1000 ${iso};
mount /dev/loop1000 ${mnt}/iso;
cd ${mnt}/initrd;
zcat ${mnt}/iso/install.amd/initrd.gz|cpio -i;
cp -rp ${mnt}/iso cdrom/
cp $mnt/iso/install.amd/vmlinuz ${odir}/vmlinux
find .|cpio -o -H newc|gzip -9 >${odir}/initrd
cd ${odir};
umount ${mnt}/iso;
losetup -d /dev/loop1000;
rm -rf $mnt
odir=/root/o
mnt=$(mktemp -d);
mkdir ${mnt}/iso ${mnt}/initrd;
losetup /dev/loop1000 ${iso};
mount /dev/loop1000 ${mnt}/iso;
cd ${mnt}/initrd;
zcat ${mnt}/iso/install.amd/initrd.gz|cpio -i;
cp -rp ${mnt}/iso cdrom/
cp $mnt/iso/install.amd/vmlinuz ${odir}/vmlinux
find .|cpio -o -H newc|gzip -9 >${odir}/initrd
cd ${odir};
umount ${mnt}/iso;
losetup -d /dev/loop1000;
rm -rf $mnt
2019年12月6日 星期五
udevadm rule 筆記
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_PATH_TAG}=="pci-0000_00_1f_2-ata-1", NAME="sda"
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_PATH_TAG}=="pci-0000_00_1f_2-ata-2", NAME="sdb"
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_PATH_TAG}=="pci-0000_00_1f_2-ata-3", NAME="sdc"
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_ATA_SATA}=="1", SYMLINK+="sata0/$env{ID_PATH_TAG}"
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_PATH_TAG}=="pci-0000_00_1f_2-ata-2", NAME="sdb"
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_PATH_TAG}=="pci-0000_00_1f_2-ata-3", NAME="sdc"
KERNEL=="sd[a-z]*", ENV{DEVTYPE}=="disk", ENV{ID_ATA_SATA}=="1", SYMLINK+="sata0/$env{ID_PATH_TAG}"
訂閱:
文章 (Atom)