2013年12月13日星期五

安装vpn pptp服务器

安装SL linux 1CPU,512M
linux安装完毕,设置IP地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0










关闭IPV6,重启电脑
安装依赖包ppp perl
yum install ppp perl
wget   http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.4.0-1.el6.x86_64.rpm
rpm  -Uhv pptpd-1.4.0-1.el6.x86_64.rpm

vi /etc/pptpd.conf
localip 192.168.20.1

remoteip 192.168.20.21-40

vpnuser add 用户名 密码
此数据存贮于/etc/ppp/chap-secrets


/etc/ppp/options.pptpd PPTPD 常用选项

vi /etc/sysctl.conf

net.ipv4.ip_forward = 1 开启路由转发
sysctl -p /etc/sysctl.conf sysctl.conf 立即应用

service pptpd restart

在路由器上做tcp1723 及协议号47的映射
所谓协议号47映射,即使用下面的指令
nat server protocol 47 global X.X.X.X inside X.X.X.X

*nat
:PREROUTING ACCEPT [25:1568]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 192.168.20.0/24 -o eth0 -j MASQUERADE
 *filter
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1723 -j ACCEPT
-A INPUT -p gre -j ACCEPT
在/etc/sysconfig/iptables 添加
-A FORWARD -j REJECT --reject-with icmp-host-prohibited 一定要注释掉这条规则







2013年11月1日星期五

CentOS关闭ipv6




在CentOS中,关闭IPV6

vi /etc/sysctl.conf

添加,注意空格net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1
运行
sysctl -p

在线服务器使用
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6


 

2013年10月28日星期一

Elastix关闭443,80,3306,22,5038,cyrus,rpc,portmap,op_server.pl

设置只监听Lan address 80
vi /etc/httpd/conf/httpd.conf
将Listen 80改为 Listen 192.168.1.1:80
即可让80端口只响应内网IP

关闭443
vi /etc/httpd/conf.d/ssl.conf
将Listen 443 注释掉
重启httpd
service httpd restart

关闭3306在外网监听
vi /etc/my.cnf
[mysqld]
添加 bind-address=127.0.0.1
/etc/init.d/mysqld restart

关闭22在外网监听
vi /etc/ssh/sshd_config
修改ListenAddress 192.168.1.1即可

关闭5038在外网监听
vi /etc/asterisk/manager.conf
将bindaddr = 0.0.0.0 改为 127.0.0.1
或将 enabled =yes 改为 no

关闭cyrus
service cyrus-imapd stop
chkconfig cyrus-imapd off

关闭 rpc.statd
service nfslock stop
chkconfig nfslock off

关闭portmap
service portmap stop
chkconfig 


关闭op_server.pl
vi /var/www/html/panel/op_server.cfg
设置listen_addr=192.168.1.1

2013年8月27日星期二

ubuntu使用极点五笔 实现五笔拼音混输(经使用,很多字没法打出来,且是繁体字,最终放弃)

引用以下网址:http://forum.ubuntu.org.cn/viewtopic.php?t=262266
  http://www.zainuo.com/editor/7-zhzdyezpubuntudezhezdyeziepzhyizhdyezgzhyzhi.html
首先下载极点五笔码表文件,地址如下:
1:https://github.com/vissible/jdwb4linux
2:http://www.unicom-china.com/download/vissible-ibus.tar.gz


將下載的包解厭
tar -zxvf vissible-ibus.tar.gz
將碼表与圖標文件copy入相應的目睩
sudo cp vissible.db /usr/share/ibus-table/tables
sudo cp vissible.gif /usr/share/ibus-table/icons

重启ibus,并添加输入法,不知何因,有許多的繁体字,很多字也打不出來。

zzbd 标点符号 zzpy 拼音符号 zzts 特殊符号
zzsx 数学符号 zzdx 单位符号 zzjt 箭头符号
zzys 圆圈数字 zzpp 偏旁    zzds 带点数字

经使用,很多字没法打出来,且是繁体字,最终放弃

xp批处理vpn及设置静态路由

@echo off
rem "链接名称" 用户名 密码
rasdial "telecom" username password
for /f "delims=: tokens=2" %%i in ('ipconfig ^|find /i "address" ^| find /i "192.168.10."') do ( route add 192.168.2.0 mask 255.255.255.0 %%i route add 192.168.13.0 mask 255.255.255.0 %%i)
 rem 上面的命令意思是,在ipconfig的结果中找到含有address 192.168.10的行
 rem 用:将此行分为前后两列,取第2列
 rem 即取出VPN拨号后的地址,在do后面加上你的路由就可以了
rem 192.168.10是拨号后的VPN client地址,需要修改成你自己的

2013年8月12日星期一

Ubuntu 13.04 安装citrix iac client


 sudo apt-get install libmotif4:i386

https://www.citrix.com/downloads/citrix-receiver/linux/receiver-for-linux-121.html#ctx-dl-eula
下载客户端

sudo dpkg -i icaclient


sudo ln -s /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts/

Ubuntu 13.04 安装 virtualbox

Install Virtualbox key
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

add source
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian raring contrib" >> /etc/apt/sources.list.d/virtualbox.list'

sudo apt-get update

sudo apt-get install virtualbox 4.x

2013年8月10日星期六

ubuntu 13.04 安装wine

sudo add-apt-repository ppa:ubuntu-wine/ppa

sudo apt-get update

sudo apt-get install wine1.6-amd64

sudo apt-get install libp11-kit-gnome-keyring:i386

http://www.tecmint.com/install-wine-on-ubuntu-and-linux-mint/

Ubuntu 13.04 l2tp vpn 连接华为路由器

以下引用来自http://www.cherrot.com/2012/03/network-manager-l2tp-vpn-plugin-ipsec-supported

添加network-manager-l2tp-gnomePPA

sudo apt-add-repository ppa:seriy-pr/network-manager-l2tp

You are about to add the following PPA to your system:
Packages for https://github.com/seriyps/NetworkManager-l2tp Screenshot: http://dl.seriyps.ru/img/network-manager-l2tp.png
Full description (in russian) http://seriyps.ru/blog/2012/01/31/plagin-l2tp-dlya-networkmanager/
Installation:
sudo apt-add-repository ppa:seriy-pr/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp-gnome
!!!!!!!!!!!!!!!!!!
sudo service xl2tpd stop
sudo update-rc.d xl2tpd disable
!!!!!!!!!!!!!!!!!!
 More info: https://launchpad.net/~seriy-pr/+archive/network-manager-l2tp

sudo apt-get update
sudo apt-get install network-manager-l2tp-gnome
sudo service xl2tpd stop
sudo update-rc.d xl2tpd disable

在网络管理中就有l2tp选项了
如有错误,重启即可解决

Ubuntu 13.04 安装ubuntu-tweak 通过ppa

sudo add-apt-repository ppa:tualatrix/ppa

sudo apt-get update

sudo apt-get install ubuntu-tweak

Ubuntu 13.04 安装chrome 通过PPA

参考 http://www.google.com/linuxrepositories/
download the key and then use apt to install it.
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
-q = --quiet wget关闭输出

add it to the repository.
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list' 
sudo apt-get update
sudo apt-get install google-chrome-stable

OK,Chrome installed!

2013年5月7日星期二

三零凯天

三零凯天分两种型号,一为IH0911-V100,一为IH0811-V200,V100使用BCM7466芯片,V200使用TMS320DM644.

1)V100连接好TTL线后(115200),使用Ctrl+C可以进入CFE,可用命令如下:
ts                  Time stamp utility
info                Show CFE configuration information
loop                Loop a command
reboot              Reboot the system
dir                 List the directory of a FAT file system
macprog             Program MAC addresses.
macprog2            Program a specific MAC address.
flash               Update a flash memory device
memtest             Test memory.
f                   Fill contents of memory.
e                   Modify contents of memory.
d                   Dump memory.
u                   Disassemble instructions.
batch               Load a batch file into memory and execute it
go                  Start a previously loaded program.
load                Load an executable file into memory without executing it
save                Save a region of memory to a remote file via TFTP
boot                Load an executable file into memory and execute it
ping                Ping a remote IP host.
ifconfig            Configure the Ethernet interface
sleep               Sleep for specified milliseconds.
waitusb             Wait for USB device to be installed.
show usb            Display devices connected to USB bus.
show heap           Display information about CFE's heap
show memory         Display the system physical memory map.
show devices        Display information about the installed devices.
unsetenv            Delete an environment variable.
printenv            Display the environment variables
setenv              Set an environment variable.
help                Obtain help for CFE commands

2)可以使用macprog2更改MAC,更改后将写入flash不会变了
CFE> help macprog2
  SUMMARY
     Program a specific MAC address.
  USAGE
     macprog2
     This command programs board specific MAC addresses to the
     flash. (ex. macprog 00-60-6E-70-0D-A2)
*** command status = 0
3)mount情况
# mount
rootfs on / type rootfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/mtdblock2 on /mnt/nv type jffs2 (rw)
/dev/mtdblock7 on /mnt/config type jffs2 (rw)
4)序列号
# pwd
/mnt/nv/etc
# ls -l
drwxrwxr-x    2 500      500             0 Jan  1 00:00 browser
-rw-r--r--    1 500      500           509 Jan  1  2000 product.ini
-rwx------    1 500      500         38663 May 31  2010 usb_modeswitch.setup
# more product.ini
[product_static]
vendor=成都三零凯天
device_type=IH0911-V200
product_serial=0010019900B021800007
remote_sensitivity=300
#0x69b5:30KT    0xff00:COSHIP&ZTE
remote_white_list=0x69b5;0xff00
Screen_Width=644
Screen_Height=534
software_version=KCQ.I01.02S
hardware_version=KB1.200.01S
#0:standard 1:yunnan
json_style=1

[logo]
standby=/mnt/nv/share/pixmaps/logo/standby_cn.png
booting_network=/mnt/nv/share/pixmaps/splash/booting_network.jpg
booting_platform=/mnt/nv/share/pixmaps/splash/booting_platform.jpg
#
5)配置情况
# pwd
/mnt/config
# ls -l
-rw-r--r--    1 500      500           957 Jan  1  2000 config.ini
-rw-rw-rw-    1 root     root          957 Jan  1 00:02 config.ini.bak
-rw-r--r--    1 500      500           927 Sep 16  2010 defconf.ini
-rw-------    1 root     root       262144 Jan  1 00:02 nvram
-rw-r--r--    1 500      500           757 Sep  6  2010 stb_config.xml
-rw-r--r--    1 500      500            12 Jul  1  2010 version_config

# more config.ini
[local_config]
conf_passwd=0213        6321        123456
#1:pppoe 2:dhcp 3:lan
net_access_mode=1
language=chinese_simplified
#0:disable 1:enable
multi_stack=0
video_standard=0
screen_saver_enable=0
screen_saver_timeout=10
tvms_enable=0
userid=ixxxxxxxxx@itv
user_password=130823
auth_url=http://epg.itv.cq.cn:8080/iptvepg/platform/index.jsp
auth_url2=http://epg.itv.cq.cn:8080/iptvepg/platform/index.jsp
igmp_version=2
timezone=UTC+8
seg_play_enable=0
#0: do not goto end directly when we play vod video
goto_end=1

[qos]
upload_url=
upload_interval=3600
record_interval=3600
statis_interval=657925
#0:disable 1:enable
qos_enable=0

[lan]
ipaddr=192.168.1.11
netmask=255.255.255.0
gateway=192.168.1.1
nameserver=192.168.1.1
nameserver2=192.168.0.1

[dhcp]
username=123456
password=123456
#0:disable option 60,125 1:enable option 60,125
ctc_option=1

[pppoe]
username=ixxxxxxxxx@itv
password=130823
release=0
local_ip_enable=0

[play_buffer]
num_buffer=80
num_drop=10

6)v200启动时按回车键可进入
NAND boot 2.12 - DRAM speed 162 MHz A126

Platform setup...
VTPIOCR is set to 0x0000A364, NCH = 0x04, PCH = 0x1B
done
NAND manufacturer Samsung and identifier 35,A5,BD

Loading IntActOS
Secure ROM start

Amino Communications IntActOS-32
AmiNET Multicast BootROM, version 1.40

TV system = PAL-I Output format = LBR-CVBS-LC
Unsupported output format - default to RGB
Ethernet: MAC address 00:22:7E:00:A5:A8
Ethernet: Auto-MDIX not supported on A126
Ethernet: Link down

Platform: AMINET125


Hit ENTER to stop normal operation ...

7)可用命令
bootos, cache, configure, fan, help, time, rem, reset, show, sprog

testled

bsaveimg, change, copy, delete, details, device, dir, format, fs, load,
loadrecov, makefs, printpartn, rename, run, save, saverecov, type, verify

mputgif, setavc

mboot

keys
8)ttl进入后,用户名为root,密码未知