********************常用命令记录********************
**语言乱码
LANG="zh.CH.gb2312"
**流量监控
tcpdump -n |grep -v 192.168.1.40
tcpdump -n dst 192.168.1.*
tcpdump -n src 192.168.1.*
**防火墙
iptables -I FORWARD -d 192.168.1.51 -j DROP
iptables -D FORWARD -d 192.168.1.75 -j DROP
过虑网站也是如此
iptables -I FORWARD -d 219.133.49.206 -j DROP
iptables -I FORWARD -d 219.133.49.6 -j DROP
**路由
route add -net 202.205.3.0 netmask 255.255.255.0 gw 192.168.1.227
route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4
route del -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.1.4
**邮件
/home/vpopmail/domains/vico-lab.com/lgq/Maildir/{cur/new/tmp}
qmailctl queue
qmailctl doqueue
**L2TP的操作
service L2tpd start/stop/status
脚本:
/etc/firewall/vpn_route delete
/etc/firewall/vpn_route add
./checkl2tpd
**FTP相关操作
**备份
cp /etc/firewall/vpn_route /etc/firewall/vpn_route.bak080821
******************重要目录存放地址********************
**网卡存放地址:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.1.255
IPADDR=192.168.1.10
NETMASK=255.255.255.0
NETWORK=192.168.1.0
HWADDR=52:54:AB:2F:CF:F0
GATEWAY=192.168.1.1
ONBOOT=on
TYPE=Ethernet
#/etc/resolv.conf
nameserver 192.168.1.1
nameserver 202.96.209.5
search localdomain
#nat客户端的设置
/etc/sysconfig/network
NETWRKING=yes
HOSNAME=localhost.localdomain
GATEWAY=192.168.1.1
使生效的命令:
/etc/init.d/network restart
**DNS解析地址
/etc/resolve.conf
**自启动的存放地址:
/etc/rc.d/init.d/
echo "1"> /proc/sys/net/ipv4/ip_forward
**开启ipforward功能
/proc/sys/net/ipv4/ip_forward
iptables配置文件:
/etc/sysconfig/iptables
******************防火墙相关内容**********************
**禁止某用户上网
iptables -I FORWARD -d 192.168.1.75 -j DROP
iptables -D FORWARD -d 192.168.1.75 -j DROP