How to user 6to4 tunnel provided by Hurricane Electric to build up IPv6 network with a Linux gateway (Centos 5). Network TOP:Steps: 1. Apply for a 6to4 tunnel, and we get the following information: Server IPv4 address: 72.52.104.74 Server IPv6 address: 2001:470:1f04:571::1/64 Client IPv4 address: 202.115.19.145 Client IPv6 address: 2001:470:1f04:571::2/64 Routed /64: 2001:470:1f05:571::/64 2.Check /etc/sysconfig/network have the following line: NETWORKING_IPV6=yes 3.Enable IPv6 on the Linux route, using the following commands and make sure they have written into /etc/rc.local so that it can work after reboot. /sbin/ifconfig sit0 up /sbin/ifconfig sit0 inet6 tunnel ::72.52.104.74 /sbin/ifconfig sit1 up /sbin/ifconfig sit1 inet6 add 2001:470:1f04:571::2/64 /sbin/ip route add 2000::/3 dev sit1 4.Enable to IPv6 forwarding (routing) echo 1 >/proc/sys/net/ipv6/conf/all/forwarding 5.Configure the local network using the following command and write it down into /etc/rc.local. ( eth0 is connected with other client on LAN), /sbin/ifconfig eth0 inet6 add 2001:470:1f05:571::1/64 6.Install "radvd" for IPv6 Stateless Address Autoconfiguration. yum install radvd -y 7.Edit the /etc/radvd.conf like this: interface eth0 { AdvSendAdvert on; MinRtrAdvInterval 30; MaxRtrAdvInterval 100; prefix 2001:470:1f05:571::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr off; }; }; 8.The network is OK. visit ipv6.google.com or ipv6.org can check the new IPv6 network. 9.You could install the DHCPv6 if you want use the IPv6 Stateful Autoconfiguration.( I still have the problem of LOSEING information of the default gateway when using DHCPv6, NEED YOUR HELP) yum install dhcpv6 -y edit /etc/dhcp6s.conf like this: (This config DON'T work well, the client will lack of the default gateway) interface eth0 { server-preference 255; renew-time 60; rebind-time 90; prefer-life-time 130; valid-life-time 200; allow rapid-commit; option dns_servers 2001:470:1f05:571::1 domain.org; link AAA { pool{ range 2001:470:1f05:571::2 to 2001:470:1f05:571::FFF1/64; 2001:470:1f05:571::/64; }; }; };
asmlinkage long
sys_init_module(void __user *umod,
unsigned long len,
const char __user *uargs)
{
......
/* Only one module load at a time, please */
if (mutex_lock_interruptible(&module_mutex) != 0)
return -EINTR;
刚进入就加锁了,似乎有点不妙。紧接着开始加载内核模块:
/* Do all the hard work */
mod = load_module(umod, len, uargs);
if (IS_ERR(mod)) {
mutex_unlock(&module_mutex);
return PTR_ERR(mod);
}
/* Now sew it into the lists. They won't access us, since
strong_try_module_get() will fail. */
stop_machine_run(__link_module, mod, NR_CPUS);
/* Drop lock so they can recurse */
mutex_unlock(&module_mutex);
blocking_notifier_call_chain(&module_notify_list,
MODULE_STATE_COMING, mod);
/* Start the module */
if (mod->init != NULL)
ret = mod->init();
I've been looking for a decent groupware for a small start-up company. Therefore I've been trying out Scalix, Zimbra, OpenXchange (absolute nightmare to get running*) and others. While Scalix and Zimbra are indeed serious concurrence, Kerio just stunned me by it's ease of installation (Scalix took me 1 day, zimbra 1 week, Kerio 5 minutes.**) and administration. Everything seems to work right out of the box.
Being a debian/ubuntu fan, I am missing a Kerio debian version though. It's a real pitty, because Kerio is indeed working (almost) out of the box in debian. As far as i can see the only thing that has to be rewritten is the start-stop script in /etc/init.d/.
I hope this encourages you to release a debian version of Kerio Mailserver.
Disclaimer: This is neither an official nor a supported way of installing. I am not responsible for any damage resulting from following this HowTo. Do it on your own responsibility!
Here's how I did it:
1. Get a clean Debian Etch Server System 2. If postfix/sendmail is installed, remove it:
apt-get remove postfix sendmail
3. Install the needed packages: alien: Provides the RPM-to-DEB-Conversion libstdc++5: Required
apt-get install alien libstdc++5
4. Download the Kerio Linux RPM-Package 5. Transform the RPM into a DEB
7. Switch to the Kerio installation dir, and start config wizard
cd /opt/kerio/mailserver
./cfgwizard
8. As /etc/init.d/keriomailserver won't work, just stay in the dir. and start it manually: et voilà!
./mailserver
The admin tool can be installed accordingly on a local computer. (Don't know what a gui's doing on a server ;))
* The new version is still in alpha though... ** All of them running in "unsupported" debian etch environments, normally you probably could install all of them in less than an hour!
I am running Kerio on a XEN domU Virtual Server under Debian Etch 4.0 with 2.6.18 kernel
[Updated on: Wed, 25 April 2007 21:56]
And /etc/init.d/keriomailserver:
case "$1" in
start)
echo -n "Starting Kerio MailServer: "
ulimit -c unlimited
ulimit -s 2048
ulimit -n 4096
cd /opt/kerio/mailserver && ./mailserver
echo "OK"
;;
stop)
echo -n "Stopping Kerio MailServer: "
PID=`pidof mailserver`
if [ "$PID" ] ; then
kill $PID
echo "killing...."
else
echo "not running?"
fi
;;
esac
There is no way to log out of a .htaccess protected directory, unfortunately browsers have never implemented a "forget password" feature! So we need to be imaginative!
Browsers only store one password per realm so we need to trick the browser into storing another "fakeusers" credentials.
This guide will discuss a number of options, not all of these are proven but have been tested with mixed results.
Method 1::
The first method is not an actual logout and probably will not appeal to many but it works without fail. Very simply, your "logout" button is actually a "close-window" button. This ends the browser session, wiping the login details, forcing the user to re-enter their details next time they attempt to access the protected directory.
You can close the browser window without a prompt with the following code:
You can also try the following which may appeal to you better. When accessing the protected area, open it in a new window, you can then use a standard window closer as the logout button. This has the advantage of keeping the parent window open, which you may prefer. However, I find that this method doesn't always work as the parent window may also store the login credentials.
Comments:
It works in IE but in Mozilla the browser won't close a window it didn't open.
It means you have to close the browser window which you may not want to do.
You lose focus from your site.
The following methods all have the same underlying method, to overwrite the logged in users credentials with a fake-users crenditials.
Method 2::
We assume you have already created a password protected directory with .htaccess and .htpasswd files. If you haven't then do so immediately! We'll call this directory "Restricted".
Now, create a sub-directory outside of the "Restricted" directory called (for example) "logout". Password protect this directory allowing access to one fake-user. This fake-user can have a username "fakeuser" and password "fakepass". So directory logout should now contain it's own .htaccess and .htpasswd files allowing access only to user "fakeuser".
Next we create the logout button.
In order to replace the login information saved by the browser we overwrite it with the information needed to access directory "logout". As it is a 'logout link' we shouldn't have to enter any user information, this must be carried in the link.
When the link is clicked the username and password allows access to the "logout" directory. You can create an index.htm in the "logout" directory which can display a good-bye message or links to other areas of your site etc.
Also, since the browser now has saved the "new" user information your users will have to re-login if they want to access the "Restricted" directory, thus completing the appearance of having logged out!
Comments:
Can be difficult to set up but does work after some effort.
You may run into the problem that the browsers is treating the "logout" directory as a new realm and storing the user credentials for this directory as well as "Restricted" directory.
The third method is basically the same as method 2 but for the reasons highlighted above we make one important change.
This time we place the "logout" directory inside the restricted directory. Again, the "logout" directory allows access only to "fakeuser". The link code must reflect this change:
May get the problem that accessing "Restricted" will also allow you to access "logout" so the method will fail.
Method 4::
So far I have been unable to get this to work for me so if you see that i'm doing something wrong and can improve on the method then please let me know so we can share it with others!
This method involves password protecting an individual file, not a sub-directory!
Keeping with protected directory "Restricted" now create a file in this directory we can call "logout.htm". This file can contain your good-bye message etc.
In order to protect this file, using the same "fakeuser" info as previously (fakeuser & fakepass), we need to add the following to the .htaccess:
You may have trouble "merging" password protection for both the Restricted directory and the logout.htm file in the directory. This may take some tweaking to sort out!
Comments:
Protecting the individual file can be a problem. "Experts" have told me it can be done but I have not had success with this method.
You may need to place the "logout.htm" in a sub-directory of restricted so you can place it's own .htaccess file in that directory.
Final Comment:
Don't just rely on the .htaccess to do all the work, there's a number of things you can do to help. Example: One application which I created for someone uses SSI extensively to not only redirect each logged in user to their individual directories but keeps users away from other users files and also forces all users to enter only through the login page.
Since browsers first started implementing basic authentication, web site administrators have wanted to know how to let the user log out. Since the browser caches the username and password with the authentication realm, as described earlier in this tutorial, this is not a function of the server configuration, but is a question of getting the browser to forget the credential information, so that the next time the resource is requested, the username and password must be supplied again. There are numerous situations in which this is desirable, such as when using a browser in a public location, and not wishing to leave the browser logged in, so that the next person can get into your bank account.
However, although this is perhaps the most frequently asked question about basic authentication, thus far none of the major browser manufacturers have seen this as being a desirable feature to put into their products.
Consequently, the answer to this question is, you can't. Sorry.
root@dreambox:/var/mnt/nfs> df -h Filesystem Size Used Available Use% Mounted on /dev/root 3.8M 3.8M 0 100% / /dev/mtdblock/1 2.8M 444.0k 2.3M 16% /var 192.168.1.8://home/nfs 9.2G 516.4M 8.2G 6% /var/mnt/nfs
root@dreambox:/var/mnt/nfs> dd if=/dev/zero of=/var/mnt/nfs/ram bs=1M count=128 128+0 records in 128+0 records out root@dreambox:/var/mnt/nfs> mkswap -c /var/mnt/nfs/ram Setting up swapspace version 1, size = 134213632 bytes
[Copy to clipboard] [ - ]CODE: root@dreambox:/var/mnt/nfs> ./undreamboxfs pli-Helenite-dm500-20070417-2696.img ./img1 9928+0 records in 9928+0 records out Done! root@dreambox:/var/mnt/nfs> 将完成修改的IMG重新打包,这个步骤挺费时间的:
root@dreambox:/var/mnt/nfs> ./mkdreamboxfs img1 new.img Directory data: 164 bytes Everything: 1000 kilobytes Super block: 76 bytes CRC: 72538600 155648+0 records in 155648+0 records out Ready to make the squashFS part! This can take 1 or 2 minutes! Creating big endian 2.1 filesystem on tmp_mkdreambox_3, block size 65536.
Big endian filesystem, data block size 65536, compressed data, compressed metadata, compressed fragments Filesystem size 4963.29 Kbytes (4.85 Mbytes) 35.86% of uncompressed filesystem size (13840.55 Kbytes) Inode table size 6016 bytes (5.88 Kbytes) 24.73% of uncompressed inode table size (24324 bytes) Directory table size 7914 bytes (7.73 Kbytes) 50.69% of uncompressed directory table size (15614 bytes) Number of duplicate files found 49 Number of inodes 1086 Number of files 788 Number of fragments 57 Number of symbolic links 199 Number of device nodes 0 Number of fifo nodes 0 Number of socket nodes 0 Number of directories 99 Number of uids 1 root (0) Number of gids 0 Done! root@dreambox:/var/mnt/nfs>
root@dreambox /mnt # ./mkdreamboxfs img2 new.img Directory data: 164 bytes Everything: 1000 kilobytes Super block: 76 bytes CRC: cfc8e1f0 155648+0 records in 155648+0 records out Ready to make the squashFS part! This can take 1 or 2 minutes! Creating big endian 2.1 filesystem on tmp_mkdreambox_3, block size 65536. FATAL ERROR:zlib::compress failed, not enough memory cat: tmp_mkdreambox_3: No such file or directory Done!
二、如何中文化菜单?
中文化菜单需要修改如下文件: 1、IMG解包后,修改share/locale/locale.alias 这个文件,增加一行内容: Chinese zh_CN
#ifdef TEST_ACCESS_PROCESS_VM char buf[4096+8] = "TEST ACCESS_PROCESS_VM"; test_user_copy() { struct task_struct *t; int len = 1024*4; long addr = 0x4014d008; //this is a fixed addr printed by tfile.c, never change. int found = 0; int i;