- 论坛徽章:
- 0
|
debian 有两张网卡.
eth0:
192.168.1.100( 连外网)
eth1:
10.0.0.1(内网)
debian 安装了pptpd
vi /etc/pptpd.conf
localip 192.168.0.1
remoteip 192.168.0.2-238
vi /etc/ppp/options
ms-dns 172.18.0.6
vi /etc/ppp/chap-secrets
# client server secret IP addresses
kedi * 123 *
其它的地方默认的.
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
客户端可以连上,但只能打开baidu.com,google.com. 不能打开163.sina..
客户端得到的IP信息是:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
Physical Address. . . . . . . . . : 00-53-45-00-00-00
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 192.168.0.2
DNS Servers . . . . . . . . . . . : 172.18.0.6
[ 本帖最后由 mfkwwgi 于 2010-1-10 22:40 编辑 ] |
|