Archives

You are currently viewing archive for June 2008
Category: Linux tips
Posted by: hajime osako
HowTo: Add a Persistent Static Route in Redhat Enterprise Linux | ItsyourIP.com
How do I create persistent static routes in Red Hat Enterprise Linux 4?
How do I set my static routes in Red Hat Enterprise Linux 2.1?

To add a persistent static route in Redhat Enterprise Linux create a file called route-X in the /etc/sysconfig/network-scripts/ directory

Example:

GATEWAY0=192.168.1.1
NETMASK0=255.255.255.0
ADDRESS0=10.10.10.0

GATEWAY1=192.168.1.1
NETMASK1=255.255.255.0
ADDRESS1=20.20.20.2


To check:
# route (-e or -ee)
Category: Linux tips
Posted by: hajime osako
"/etc/sysconfig/network-scripts"

Networking - Adding an IP Address to an Interface With Red Hat and CentOS

# ifconfig eth0:0 10.129.1.99 netmask 255.255.255.0
Category: Linux tips
Posted by: hajime osako
Category: Linux tips
Posted by: hajime osako
HOWTO - Linux VNCserver

#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
startx &

To kill
vncserver -kill :1

06/05: wget

Category: Linux tips
Posted by: hajime osako
Geek to Live: Mastering Wget

Example:
# wget --no-check-certificate --user-agent "Mozilla Firefox" --load-cookies /home/user/.mozilla/firefox/xrp6qley.default/cookies.txt https://www.h-osa.com/
Category: Linux tips
Posted by: hajime osako
tcpdump を使いこなそう
tcpdump atmarkit

# tcpdump -ni eth0 host 192.168.0.1
(i specifies interfece, n is numeric output)
# tcpdump host [IP] -nnxX -s0 -l | tee /tmp/tcpdump.cap
# tcpdump -i eth1 -s0 -n -w /tmp/tcpdump.cap
(-w is useful to read Wireshark(http://www.wireshark.org/))


# iptables -F [chain] (Delete/Flush all rules in chain)
# iptables -L [chain] -n (List the chain with numeric output)

# arping -I eth0 192.168.0.1 (which Ethernet device to use)

# time echo quite | telnet 192.168.0.1 8080