wiki:TipAndDoc/network

Version 10 (modified by mitty, 15 years ago) (diff)

--

disable ipv6

  • 以下の一行を、modprobeの設定ファイルに追加
    install ipv6 /sbin/modprobe -n -i ipv6
    
    • Ubuntu -> /etc/modprobe.d/blacklist (/etc/modprobe.d/* のどれでも可)
    • RedHat -> /etc/modprobe.conf

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
    

iptables

warning with dhcp3

/etc/ppp/ip-up.local

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 <prefix>] address
        
                -r: Print Reverse Ranges
                -d <prefix>: 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 tool/netmask計算 - Linux Tips

Attachments (4)

Download all attachments as: .zip