Example for shaping scp download to 100KB/s:
trickle -d 100 scp remote.host.ip:big_file.iso .
trickle -d 100 scp remote.host.ip:big_file.iso .
# cat Makefile
obj-m := ptpatch2008.o
KDIR := /lib/modules/`uname -r`/build
PWD := `pwd`
default:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
cd /opt nc -l -p 2000 | tar -xf -edit: Newer netcat, command will looks like "nc -l 2000 | tar -xf -"
cd /opt tar -cf - sybase | nc destination.host.ip 2000
[global]
guest account = unknown
security = share
server string = skynet
netbios name = skynet
guest ok = yes
oplocks = yes
[data]
path = /data
# read only = no
[global]
guest account = unknown
server string = skynet
netbios name = skynet
guest ok = yes
oplocks = yes
[data]
path = /data
# read only = no
taskset -c 0 process
taskset -pc 1 22560
pbind -b 2 208
cat /etc/samba/smb.conf [global] netbios name = darkstar server string = darkstar guest ok = yes security = share [data] path = /data # read only = no
[global]
netbios name = darkstar
server string = darkstar
guest ok = yes
security = user
map to guest = bad user
[data]
path = /data
# read only = no
# semanage fcontext -a -t samba_share_t "/data(/.*)?" # restorecon -Rv /data ### this third line may be needed if /data is managed by local user # setsebool -P samba_enable_home_dirs 1
# cat /etc/samba/smb.conf [global] server string = darkstar guest ok = yes security = user workgroup = workgroup guest account = nobody map to guest = bad user
Go into Local Group Policy Editor (gpedit.msc) Navigate into Administrative Templates - Network - Lanman Workstation. Then the Setting : Enable insecure guest logons has to be set to "Enable".
cat /etc/rc.d/rc.firewall
#!/bin/sh
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
# enable incoming ssh and echo requests (ping)
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p icmp --icmp-type 8 -j ACCEPT