[[PageOutline]] [[TitleIndex(TipAndDoc/network,format=group)]] * [http://linux-ip.net/ Guide to IP Layer Network Administration with Linux (http://linux-ip.net/)] * [http://www.linux.or.jp/JF/JFdocs/Adv-Routing-HOWTO/lartc.kernel.obscure.html Linux Advanced Routing & Traffic Control HOWTO - あまり知られていない設定] = disable ipv6 = * 以下の一行を、modprobeの設定ファイルに追加 {{{ install ipv6 /sbin/modprobe -n -i ipv6 }}} * Ubuntu -> /etc/modprobe.d/blacklist (/etc/modprobe.d/* のどれでも可) * RedHat -> /etc/modprobe.conf * [http://d.hatena.ne.jp/adsaria/20080525 UbuntuでIPv6を無効化 - adsaria mood] * [http://fun.poosan.net/sawa/index.php?UID=1197817541 Fedora で IPv6 をスマートに無効化] = open relay test = * telnet localhost 25 「以外」のIPで繋いで、以下のような例でメール送信できたらOpen relayになっているので注意 {{{ HELO mitty.jp MAIL FROM: hoge@mitty.jp RCPT TO: fuga@example.org DATA From: hoge@mitty.jp Subject: test relay testmail . QUIT }}} = warning with dhcp3 = * [https://bugs.launchpad.net/ubuntu/+source/dhcp3/+bug/39249 Bug #39249 in dhcp3 (Ubuntu): “(Dapper, Hardy) can't create /var/lib/dhcp3/dhclient.eth0.leases: Permission denied”] * ◦sudo chown dhcp:dhcp /var/lib/dhcp3/ = /etc/ppp/ip-up.local = * Ubuntu(Debian)の、/etc/network/interfacesにおけるpost-up command(のPPP版)にあたるもの * [http://tsutomu.lasttom.jp/item/30 らpapa's Web Site - CentOSでソースポリシールーティング] * [http://www.org3.net/tech_notes/flets-square.html フレッツ・スクウェア - マルチセッション] = SYN Cookies = * [http://ja.wikipedia.org/wiki/SYN_cookies SYN cookies - Wikipedia] * [http://lkml.org/lkml/2008/2/5/167 LKML: Andi Kleen: Re: [PATCH] Add IPv6 support to TCP SYN cookies] * [http://www.soi.wide.ad.jp/class/20060020/slides/11/26.html SYN Cookiesの動作] * to enable * sysctl -w net.ipv4.tcp_syncookies=1 * /etc/sysctl.conf > net.ipv4.tcp_syncookies=1 = calculate netmask = * ipcount <= perlのNet::IPモジュールに含まれる * aptitude install libnet-ip-perl * /usr/share/doc/libnet-ip-perl/examples/ipcount {{{ Usage: ipcount [-r] [-d ] address -r: Print Reverse Ranges -d : Cut down the original prefix in several prefixes The address range can be one of: ipcount IP + size ipcount IP1 - IP2 ipcount IP/len }}} * via [http://linux.mini13i.gotdns.org/?tool%2Fnetmask%B7%D7%BB%BB tool/netmask計算 - Linux Tips] = NICが活性化される順序 = #NIClinkOrder * CentOS * ifcfg? の数字が若い順に固定?(任意の順序に変更できるか不明) * Ubuntu * interfacesに記載された順の模様 = wakeonlan = * sudo aptitude install -R wakeonlan * デフォルトルートとは違うNICから送出したい場合 * wakeonlan -i 192.168.100.255 00:1D:60:XX:YY:ZZ {{{ Sending magic packet to 192.168.100.255:9 with 00:1D:60:XX:YY:ZZ }}} * tcpdump -np port 9 -i eth0 {{{ 11:30:32.420790 IP 192.168.100.254.34625 > 192.168.100.255.9: UDP, length 102 }}} = fix DNS server on DHCP network = * DHCP配下のネットワークで、DNSを固定する * デフォルトではIP割り当て時に/etc/resolve.confが自動で書き換わってしまう * man dhclient.conf {{{ OPTION MODIFIERS The supersede statement supersede [ option declaration ] ; If for some option the client should always use a locally-configured value or values rather than whatever is supplied by the server, these values can be defined in the supersede statement. }}} * /etc/dhcp3/dhclient.conf {{{ supersede domain-name-servers 127.0.0.1; }}} * => /etc/resolv.conf {{{ nameserver 127.0.0.1 }}}