udpをssh越しにはport forward出来ないということで
ncコマンドでudp-> tcp --| ssh |-- tcp -> udpという風に橋渡しさせるという方法。
[ port forward ]
ssh server_address -L 4800:localhost:4800
[ local server ]
nc -l -u 3939 < /var/tmp/squid_fifo | nc localhost 4800 > /var/tmp/squid_fifo
[ remote server ]
nc -l 4800 < /var/tmp/squid_fifo | nc -u 127.0.0.1 3939 > /var/tmp/squid_fifo
*上記はFreeBSDでの例です。
---
参考サイト: http://zarb.org/~gc/html/udp-in-ssh-tunneling.html
Friday, December 22, 2006
Tuesday, July 04, 2006
pipe of death
::1 - - [04/Jul/2006:11:00:47 +0900] "GET / HTTP/1.0" 404 198 "-" "Apache/2.2.2 (Unix) (internal dummy connection)"
| This function connects to the server, then immediately closes the
| connection.
| This permits the MPM to skip the poll when there is only one listening
| socket, because it provides a alternate way to unblock an accept()
| when the pod is used.
| The pipe of death is used to tell all child processes that it is time
| to die gracefully.
Tuesday, June 20, 2006
qmail/queue/lock/trigger
久しぶりに、また作り忘れてしまった。trigger。
---
kinoko# pwd
/var/qmail/queue
kinoko# cd lock
kinoko# ls
sendmutex tcpto
kinoko# mkfifo trigger
kinoko# chown qmails:qmail /var/qmail/queue/lock/trigger
kinoko# chmod 622 trigger
kinoko# ls -l /var/qmail/queue/lock/
total 4
-rw------- 1 qmails qmail 0 Feb 9 20:06 sendmutex
-rw-r--r-- 1 qmailr qmail 1024 Jun 24 00:37 tcpto
prw--wx-wx 1 qmails qmail 0 Jun 20 11:28 trigger
---
kinoko# pwd
/var/qmail/queue
kinoko# cd lock
kinoko# ls
sendmutex tcpto
kinoko# mkfifo trigger
kinoko# chown qmails:qmail /var/qmail/queue/lock/trigger
kinoko# chmod 622 trigger
kinoko# ls -l /var/qmail/queue/lock/
total 4
-rw------- 1 qmails qmail 0 Feb 9 20:06 sendmutex
-rw-r--r-- 1 qmailr qmail 1024 Jun 24 00:37 tcpto
prw--wx-wx 1 qmails qmail 0 Jun 20 11:28 trigger
Tuesday, May 09, 2006
kernel: NETDEV WATCHDOG: eth0: transmit timed ou
kernel: NETDEV WATCHDOG: eth0: transmit timed out
kernel: e1000: eth0: e1000
-----
TCP Segmentation Offload (TSO)
http://www.sys.cs.tuat.ac.jp/~shina/memo/nic.html
# ethtool -i eth0
driver: e1000
version: 5.6.10.1-k2
firmware-version: N/A
bus-info: 0000:02:01.0
# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
----
# ethtool -K eth0 tso off
# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: off
下記、どこのサイトで拾ってきたかわすれちゃった…。
----
1.modules.confの[alias eth? e1000]の下に以下を追加
# vi /etc/modules.conf
options e1000 RxIntDelay=0,0
2.再起動
# reboot
3.再起動後、下記のコマンドを実行
# ethtool -K eth0 tso off
# ethtool -K eth1 tso off
4.上記コマンドは再起動すると無効になる為、rc.localに以下を追加
# vi /etc/rc.local
if [ -x /usr/sbin/ethtool ]; then
/usr/sbin/ethtool -K eth0 tso off
/usr/sbin/ethtool -K eth1 tso off
fi
----
kernel: e1000: eth0: e1000
-----
TCP Segmentation Offload (TSO)
http://www.sys.cs.tuat.ac.jp/~shina/memo/nic.html
# ethtool -i eth0
driver: e1000
version: 5.6.10.1-k2
firmware-version: N/A
bus-info: 0000:02:01.0
# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: on
----
# ethtool -K eth0 tso off
# ethtool -k eth0
Offload parameters for eth0:
rx-checksumming: on
tx-checksumming: on
scatter-gather: on
tcp segmentation offload: off
下記、どこのサイトで拾ってきたかわすれちゃった…。
----
1.modules.confの[alias eth? e1000]の下に以下を追加
# vi /etc/modules.conf
options e1000 RxIntDelay=0,0
2.再起動
# reboot
3.再起動後、下記のコマンドを実行
# ethtool -K eth0 tso off
# ethtool -K eth1 tso off
4.上記コマンドは再起動すると無効になる為、rc.localに以下を追加
# vi /etc/rc.local
if [ -x /usr/sbin/ethtool ]; then
/usr/sbin/ethtool -K eth0 tso off
/usr/sbin/ethtool -K eth1 tso off
fi
----
Friday, April 14, 2006
Wednesday, April 12, 2006
root password変更
http://lantech.geekvenue.net/chucktips/jason/chuck/1002317496/index_html から
-----------
[Boot in single user mode]
[Mount the filesystems]
[Change the root password]
-----------
[Boot in single user mode]
As the operating system is starting, it will display the following message:
Hit [Enter] to boot immediately, or any other key for command prompt.
Booting [kernel] in 10 seconds...
You should now press the space bar, and you will see the following message:
Type '?' for a list of commands, or 'help' for more detailed help.
ok
Now type boot -s and press the enter key to start FreeBSD in single user mode. After the system boots, you should see the statement:
Enter full pathname of shell or RETURN for /bin/sh:
Press the enter key and you will have a # prompt.
[Mount the filesystems]
At the command prompt, issue the mount command. This command will mount all the filesystems listed in your /etc/fstab file.
# mount -t ufs -a
[Change the root password]
Issue the passwd command and you will be prompted to enter a new password for the root account.
# passwd
New password:_
Retype new password:_
passwd: updating the database...
passwd: done
# exit
There is no need to reboot the operating system to go to multi-user mode. The exit command will cause the system to return to multi-user mode without a reboot.
Wednesday, April 05, 2006
Subscribe to:
Posts (Atom)