网络配置:
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.5.1
/etc/sysconfig/network-scripts/ifcfg-eth0
# Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE]
DEVICE=eth0//用于设置网络接口的名称
BOOTPROTO=static//用于设置网络接口是配置为静态地址(static)还是配置为dhcp;
BROADCAST=192.168.5.255
HWADDR=00:0C:29:D1:42:3F
IPADDR=192.168.5.247 //设置网络接口地址
GATEWAY=192.168.5.1 //设置网络接口的默网关
IPV6ADDR=
IPV6PREFIX=
NETMASK=255.255.255.0 //设置网络接口的子网掩码
NETWORK=192.168.5.0
OnBOOT=yes
# iwconfig 列举无线网卡, 一般为"wlan0"
编辑 /etc/sysconfig/wpa_supplicant
INTERFACE="-iwlan0"
编辑 /etc/wpa_supplicant/wpa_supplicant.conf
wpa_passphrase ESSID PASSWORD >> /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="NETWORKSSID"
scan_ssid=1
key_mgmt=WPA-PSK
psk="NETWORKPSK"
}
--------------------------------------
VPN配置
1. 安装工具
# yum install ppp
# yum install pptp
# yum install pptp-setup
2. VPN配置
# pptpsetup --create vpn_company --server vpn.company.com --user vpn_user
--password vpn_pass --encrypt
3. 检查配置结果
# cat /etc/ppp/chap-secrets
vpn_user vpn_company "vpm_pass" *
# cat /etc/ppp/peers/vpn_company
pty "pptp vpn.company.com --nolaunchpppd"
lock
refuse-eap
noauth
nobsdcomp
nodeflate
name vpn_user
remotename vpn_company
ipparam vpn_company
require-mppe-128
4. 注册内核模块
# modprobe ppp_mppe
5. 连接VPN
# pppd call vpn_company
6. 检查连接状态
检查日志 /var/log/messages
7. 断开连接
# killall pppd