kettő vagy több default route linux alatt

May 22nd, 2009

A legegyszerűbb verzió, 2 parancsból:

Van két interface-ünk eth0: 192.168.1.2, eth1: 192.168.2.2 és két átjárónk gw1: 192.168.1.1, gw2: 192.168.2.1

A default route a gw1 fele van (a main nevű routing táblában), de nem arra akarjuk küldeni az eth1 címéről kimenő csomagokat.

route add default gw 192.168.1.1

Ezért létrehozunk egy másik default route-ot a  default nevű routing táblában.

ip route add default via 192.168.2.1 table default

Az ip szabályok szerint (lsd. ip rule) alapesetben a main tábla default route-ja korábban kerül feldolgozásra mint a default tábláé, ezért létrehozunk egy szabályt ami az eth1-hez társított ipcímről kimenő csomagokat a default routing táblára dobja.

ip rule add from 192.168.2.2 table default

Példa /etc/network/interfaces:

auto eth0
iface eth0 inet static
        address 192.168.1.2
        netmask 255.255.255.0
        gateway 192.168.1.1

auto eth1
iface eth1 inet static
        address 192.168.2.2
        netmask 255.255.255.0
        post-up ip route add default via 192.168.2.1 table default
        post-up ip rule add from 192.168.2.2 table default
        post-down ip rule del from 192.168.2.2 table default

save putty config

February 13th, 2009

 

regedit /e "putty.reg" HKEY_CURRENT_USER\\Software\\Simontatham

clear jfs dirty state, clean jfs dirty flag

February 9th, 2009

jfs_debugfs /dev/sda
su p
12 0
x
q

mailman change host-name url

August 28th, 2008

/usr/lib/mailman/bin/dumpdb -p ./config.pck | grep web_page_url

echo web_page_url = \’https://url/\’ | config_list -i /dev/stdin name-of-mailing-list

self-signed certificate with openssl, apache

July 5th, 2008

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout server.pem -out server.pem

SSLEngine On
SSLCertificateFile server.pem
OpenSSL – Creating a self-signed cert with one command

debian linux network bonding

June 25th, 2008

apt-get install ifenslave

debian:~# cat /etc/modprobe.d/arch-aliases
options bonding mode=0 miimon=100

#mode=0 for round-robin
#mode=4 for 802.3ad

debian:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug bond0
auto bond0
iface bond0 inet dhcp
slaves eth0 eth1

Linux bonding driver infos

php mint cgi

June 21st, 2008

AddHandler php4-script .php
Action php4-script /cgi-bin/php

max page title test again 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

December 16th, 2007

ez egy újabb teszt…

max page title test 2384975209861298360986239086123987063295876439875892376528374658972364983246987523698356987

December 16th, 2007

ez egy teszt, hogy a keresőkben, hogy és mennyire jelennek meg a hosszú címek. lássuk.

debug drupal node variables

November 8th, 2007

<pre><?php print_r(get_defined_vars()) ?></pre>
<pre><?php print_r($_GLOBALS) ?></pre>