Firefxo去除黄色菜单或自定义颜色
发布时间:July 8, 2012 // 分类:Firefox // No Comments
自从火狐升级到高版本之后左上角有一黄色菜单按钮,看着极不舒服,可以安装插件Stylish自定义颜色或不显示此按钮。
1.修改为不显示appmenu-button菜单:
#appmenu-button-container{
display: none !important;
}
2.自定义appmenu-button菜单颜色为绿色:
#appmenu-button-container{
{
background: green !important;
}
3.也可以使用vimperator插件自定义:
style -name=hidemenu * #appmenu-button-container{ display: none !important; }
用shellinabox网页管理服务器shell终端
发布时间:July 7, 2012 // 分类:常用软件 // No Comments
发现一好玩的软件shellinabox,使用浏览器访问Web界面就可登录管理服务器shell终端,可使用https加密连接,比之使用putty或xshell连接ssh方便了许多。
Shellinabox安装:
wget http://shellinabox.googlecode.com/files/shellinabox-2.14.tar.gz
tar zxvf shellinabox-2.14.tar.gz
cd shellinabox-2.14
./configure
make
make install
Shellinabox参数:
-b #后台运行
-u #运行用户,默认nobody
-g #运行用户组
-p #监听端口,默认4200
-t #不以ssl运行
-c #证书目录
生成ssl证书:
openssl req -new -x509 -nodes -out server.crt -keyout server.key
cat server.crt server.key > /tmp/certificate.pem
启动Shellinabox:
shellinaboxd -b -c /tmp -p 8080
Centos安装配置Postfix邮件服务器
发布时间:July 6, 2012 // 分类:Mail // No Comments
在安装邮件服务器之前先了解几个名词,以后会用到:
MUA:用户代理端,即用户使用的写信、收信客户端软件
MTA:邮件传送端,即常说的邮件服务器,用于转发、收取用户邮件。
MDA:邮件代理端,相当于MUA和MTA的中间人,可用于过滤垃圾邮件。
POP:邮局协议,用于MUA连接服务器收取用户邮件,通信端口110。
IMOP:互联网应用协议,功能较POP多,通信端口143。
SMTP:简单邮件传送协议,MUA连接MTA或MTA连接MTA发送邮件使用此协议,通信端口25。
本次配置MTA以Postfix为例,较sendmail简单、安全,且兼容于sendmail。
Postfi安装:
yum install postfix
yum remove sendmail
/etc/init.d/postfix start
Postfix主配置设定:
cat /etc/postfix/main.cf
myhostname = mail.haiyun.me #Mail服务器域名,EHLO名称。
mydomain = www.haiyun.me #
myorigin = $mydomain #发信地址,此设置显示为@www.haiyun.me。
inet_interfaces = all #如对外提供MTA服务设置为监听所有网卡,默认只监听本地。
inet_protocols = all #支持协议,可选IPV4/IPV6。
mydestination = $mydomain $myhostname #本地邮件域名,直接接收
mynetworks_style = subnet #允许转发的来源网段,可选subnet子网,class网段,host本机
mynetworks = 192.168.1.0/24,127.0.0.0/8 #允许转发的来源IP,设置后忽略mynetworks_style参数
relay_domains = $mydestination #允许转发的目标域
smtpd_banner = $myhostname ESMTP "Mail Server" #自定服务器信息
现Postfix允许接收或发送邮件的条件:
接收邮件:
目的地为$inet_interfaces的邮件;
目的地为$mydestination或$vitual_alias_maps的邮件。
转发邮件:
来源客户端符合$mynetworks的邮件;
来源或目的为$relay_domains的邮件。
配置邮件别名:
cat /etc/aliases
test:root,test@www.haiyun.me
别名:收件地址1,收件地址2
更新别名数据库:
newaliases
配置邮件转发:
cat ~/.forward
test@www.haiyun.me,test2@www.haiyun.me
设置SMTP密码验证,为防止MTA被滥用在postfix有配置信任网段,如在外网可使用smtp密码验证方式。
以系统用户密码方式认证,先启动saslauthd服务协助postfix进行系统密码验证:
/etc/init.d/saslauthd start
chkconfig saslauthd on
yum install cyrus-sasl-plain cyrus-sasl-md5 cyrus-sasl
确定SMTPD配置文件有以下内容:
cat /usr/lib/sasl2/smtpd.conf
pwcheck_method: saslauthd #saslauthd协助smtp进行密码验证
配置Postfix使用SASL验证,编辑main.cf配置文件添加:
smtpd_sasl_auth_enable = yes #开启SMTP验证
smtpd_sasl_security_options = noanonymous #不允许匿名用户
smtpd_recipient_restrictions = #接收者限制规则,按顺序执行
permit_mynetworks, #mynetworks用户通过,匹配结束
permit_sasl_authenticated, #sasl验证用户通过,匹配结束
reject_unknown_sender_domain, #拒绝无效的发送邮件域名
reject_unauth_destination #拒绝收件人非mydestination、relay_domains或virtual_alias_maps定义域邮件
测试SMTP验证是否生效:
telnet localhost 25
Trying ::1...
Connected to localhost.
Escape character is '^]'.
220 mail.domain.com ESMTP Postfix
ehlo localhost
250-mail.domain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH LOGIN PLAIN #显示此信息代表验证正常
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
yum -y install dovecot
编辑dovecot配置文件:
vim /etc/dovecot/dovecot.conf
protocols = imap pop3 #监听协议
login_trusted_networks = 127.0.0.1 #允许登录接收邮件的IP段
设置邮件目录:
cat /etc/dovecot/conf.d/10-mail.conf
mail_location = mbox:~/mail:INBOX=/var/mail/%u
新建Mail账号:
useradd -g mail -s /sbin/nologin user
启动dovecot服务:
/etc/init.d/dovecot start
使用BIND配置动态DDNS
发布时间:July 6, 2012 // 分类:DNS // No Comments
BIND下可通过nsupdate远程、本地动态更新域指向,无需重启BIND,即DDNS,相应域规则需配置allow-update权限。
直接允许指定IP更新:
#https://www.haiyun.me
allow-update { 8.8.8.8; };
或以密钥方式验证:
dnssec-keygen -a HMAC-MD5 -b 512 -n HOST ddns #生成密钥类型为HOST,主机名ddns
cat Kddns.+157+61025.key #查看生成的密钥,后续需添加到配置文件中
ddns. IN KEY 512 3 157 S/ZqoSgQB3OZ8M0Bm4rTFJp54zTEZoBqHLMjg/ljdCTH/8VTYMvxornk y0bCpuAC0VwHzX3Eq+2Fymw/L+iQdA==
添加到主配置:
key "ddns" {
algorithm hmac-md5;
secret "S/ZqoSgQB3OZ8M0Bm4rTFJp54zTEZoBqHLMjg/ljdCTH/8VTYMvxornk y0bCpuAC0VwHzX3Eq+2Fymw/L+iQdA==";
};
zone "www.haiyun.me" IN { #相应域授权
type master;
file "named.www.haiyun.me";
allow-query { any; };
update-policy {
grant ddns name ddns.www.haiyun.me. A; #仅允许对ddns.www.haiyun.me A记录进行更改
};
复制生成的公钥与私钥到执行更新的服务器,执行更新操作:
nsupdate -k Kddns.+157+61025.key
> server 184.164.141.188
> update delete ddns.www.haiyun.me
> update add ddns.www.haiyun.me 60 A 8.8.8.8
> send
> quit
新建脚本自动更新IP:
#!/bin/bash
while ture
do
interface=pppoe-wan
dnsserver=184.164.141.188
keyfile=/root/Kddns.+157+61025.key
keydir=/root/
domain=ddns.www.haiyun.me
ddnsip=ping -c 1 $domain|grep from|awk '{print $4}'|sed 's/:$//g'
ip=`ifconfig pppoe-wan|grep inet|awk -F"[ ]+|[:]" ' {print $4}'`
if [ $ddnsip == $ip ]
echo "当前IP没有更改"
else
cd $keydir
echo "server $dnsserver" > ddns
echo "update delete $domain A " >> ddns
echo "update add $domain 600 A $ip" >> ddns
echo "send" >> ddns
nsupdate -k $keyfile -v ddns
fi
sleep 300
done
分类
- Apache (13)
- Nginx (45)
- PHP (86)
- IIS (8)
- Mail (17)
- DNS (16)
- Cacti (14)
- Squid (5)
- Nagios (4)
- Puppet (7)
- CentOS (13)
- Iptables (23)
- RADIUS (3)
- OpenWrt (41)
- DD-WRT (1)
- VMware (9)
- 网站程序 (2)
- 备份存储 (11)
- 常用软件 (20)
- 日记分析 (10)
- Linux基础 (18)
- 欧诺代理 (0)
- Linux服务 (18)
- 系统监控 (4)
- 流量监控 (7)
- 虚拟化 (28)
- 伪静态 (2)
- LVM (3)
- Shell (18)
- 高可用 (2)
- 数据库 (16)
- FreeBSD (3)
- 网络安全 (25)
- Windows (35)
- 网络工具 (22)
- 控制面板 (3)
- 系统调优 (10)
- Cisco (3)
- VPN (6)
- ROS (20)
- Vim (14)
- KMS (4)
- PXE (2)
- Mac (1)
- Git (1)
- PE (1)
- LNS (2)
- Xshell (7)
- Firefox (13)
- Cygwin (4)
- OpenSSL (9)
- Sandboxie (3)
- StrokesPlus (1)
- AutoHotKey (4)
- Total Commander (3)
- WordPress (3)
- iMacros (6)
- Typecho (2)
- Ollydbg (1)
- Photoshop (1)
- 正则 (3)
- Debian (3)
- Python (8)
- NoSQL (6)
- 消息队列 (4)
- JS (7)
- Tmux (3)
- GO (7)
- HHVM (2)
- 算法 (1)
- Docker (2)
- PT (15)
- N1 (16)
- K2P (6)
- LUKS (4)
最新文章
- 光猫拨号ImmortalWrt/OpenWRT路由获取ipv6遇到的问题
- php-fpm错误error_log日志配置
- debian-12/bookworm安装mariadb10.3和mysql5.6
- smokeping主从配置及遇到的问题
- openwrt/linux使用tcpdump/nflog ulogd记录iptables日志
- tmux bash shell自动保存history
- ImmortalWrt/OpenWRT为guest wifi网络配置ipv6 nat6
- PVE更新upgrade遇到The following packages have been kept back
- openwrt/immortalwrt修改odhcpd ipv6 preferred_lifetime和valid_lifetime
- golang版本udpxy iptv rtp多播转http单播
最近回复
- opnfense: 谢谢博主!!!解决问题了!!!我之前一直以为内置的odhcp6就是唯一管理ipv6的方式
- liyk: 这个方法获取的IPv6大概20分钟之后就会失效,默认路由先消失,然后Global IPV6再消失
- 海运: 不好意思,没有。
- zongboa: 您好,請問一下有immortalwrt設定guest Wi-Fi的GUI教學嗎?感謝您。
- 海运: 恩山有很多。
- swsend: 大佬可以分享一下固件吗,谢谢。
- Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
- 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
- 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
- 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
归档
- August 2024
- May 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- May 2023
- April 2023
- February 2023
- January 2023
- December 2022
- September 2022
- July 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- April 2021
- March 2021
- February 2021
- January 2021
- December 2020
- November 2020
- October 2020
- September 2020
- July 2020
- May 2020
- April 2020
- March 2020
- February 2020
- January 2020
- December 2019
- November 2019
- July 2019
- April 2019
- March 2019
- February 2019
- January 2019
- December 2018
- November 2018
- October 2018
- September 2018
- August 2018
- July 2018
- June 2018
- April 2018
- March 2018
- February 2018
- January 2018
- December 2017
- October 2017
- September 2017
- August 2017
- July 2017
- April 2017
- March 2017
- February 2017
- January 2017
- December 2016
- November 2016
- July 2016
- June 2016
- November 2015
- October 2015
- September 2015
- August 2015
- July 2015
- June 2015
- May 2015
- April 2015
- March 2015
- February 2015
- January 2015
- December 2014
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
- October 2011
- September 2011
- August 2011
- July 2011