Posts (page 2)
# Add the following lines to /etc/sysctl.conf if you have 512MB RAM or more :
kernel.sem = 250 32000 100 128kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096fs.file-max = 65536vm.swappiness = 1vm.vfs_cache_pressure = 50
# If you have a fast broadband
net.core.rmem_max = 16777216net.core.wmem_max = 16777216net.ipv4.tcp_rmem = 4096 87380 16777216net.ipv4.tcp_wmem = 4096 65536 16777216net.ipv4.tcp_no_metrics_save = 1
# If you have a Wifi
net.core.rmem_default = 524288net.core.rmem_max = 524288net.core.wmem_default = 524288net.core.wmem_max = 524288net.ipv4.tcp_wmem = 4096 87380 524288net.ipv4.tcp_rmem = 4096 87380 524288net.ipv4.tcp_mem = 524288 524288 524288net.ipv4.tcp_rfc1337 = 1net.ipv4.ip_no_pmtu_disc = 0net.ipv4.tcp_sack = 1net.ipv4.tcp_fack = 1net.ipv4.tcp_window_scaling = 1net.ipv4.tcp_timestamps = 1net.ipv4.tcp_ecn = 0net.ipv4.route.flush = 1
# Security
#Disable All ICMP Requests net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1
# Disables packet forwarding
net.ipv4.ip_forward=0
# Disables IP source routing
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.lo.accept_source_route = 0
net.ipv4.conf.eth0.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
# Enable IP spoofing protection, turn on source route verification
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.lo.rp_filter = 1
net.ipv4.conf.eth0.rp_filter = 1
net.ipv4.conf.default.rp_filter = 1
# Disable ICMP Redirect Acceptance
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.lo.accept_redirects = 0
net.ipv4.conf.eth0.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
# Enable Log Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.all.log_martians = 1
net.ipv4.conf.lo.log_martians = 1
net.ipv4.conf.eth0.log_martians = 1
# Disables the magic-sysrq key
kernel.sysrq = 0
# Decrease the time default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 15
# Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 1800
# Turn off the tcp_window_scaling
net.ipv4.tcp_window_scaling = 0
# Enable TCP SYN Cookie Protection
net.ipv4.tcp_syncookies = 1
# Enable ignoring broadcasts request
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Increase the tcp-time-wait buckets pool size
http://code.google.com/p/fedomatix/
su -c 'gconftool-2 --direct --config-source
xml:readwrite:/var/lib/gdm/.gconf -s --type string
/desktop/gnome/background/picture_filename /home/foo/background.jpg' gdm
1.) yum -y install patch gcc kernel-devel
2.) Download the following patch
3.) Download the RaLink driver with the latest RaLink WPA and WEP patches applied from the following link
4.) Decompress the driver source
5.) mv sta_ioctl.patch /usr/src/DPO_RT28xx_60_LinuxSTA_V1.7.0.0/os/linux/
6.) cd /usr/src/DPO_RT28xx_60_LinuxSTA_V1.7.0.0/os/linux/
7.) patch sta_ioctl.c sta_ioctl.patch
8.) cd /usr/src/DPO_RT28xx_60_LinuxSTA_V1.7.0.0
9.) sudo make
10.) sudo make install
12.) echo 'alias ra0 rt2860sta' > /etc/modprobe.d/rt2860sta
13.) modprobe rt2860sta
14.) lsmod | grep rt2860sta
rt2860sta 440000 1
15.) lspci -v
01:00.0 Network controller: RaLink Unknown device 0781
Subsystem: RaLink Unknown device 2790
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at f7ff0000 (32-bit, non-prefetchable) [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Queue=0/5 Enable-
Capabilities: [70] Express Endpoint, MSI 00
Kernel driver in use: rt2860
Kernel modules: rt2860sta
References
Useful Ruby One Liners
# Iterate through a list, and print each element contained within the list.
ruby -e 'File.foreach("list") {|i| print i}'
ruby -e 'File.foreach("list") {|i| `ssh #{i}`}'