[VPN]在redhat9上搭建了VPN(pptpd服務),外網無法訪問內網的網站,我該如何設置?
rt,伺服器雙網卡,eth1通過pppoe撥號上外網,eth0固定IP連接內網。客戶端可以通過外網可以通過vpn登錄到內網,也可以正常獲得ip地址,ping 內網的機器可以ping通,telnet、FTP等都可以用,但無法訪問內網的web伺服器。
rc.local和iptables -L -n的輸出如下:
touch /var/lock/subsys/local
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -d aa.bb.cc.0/24 -i eth0 -j ACCEPT
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A FORWARD -s aa.bb.cc.0/24 -i eth1 -j ACCEPT
# iptables -L -n
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 aa.bb.cc.0/24
ACCEPT all -- aa.bb.cc.0/24 0.0.0.0/0
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (0 references)
target prot opt source destination
#
# ifconfig ppp1
ppp1 Link encap:Point-to-Point Protocol
inet addr:192.168.0.1 P-t-P:aa.bb.dd.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:1541 errors:0 dropped:0 overruns:0 frame:0
TX packets:1431 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:218326 (213.2 Kb) TX bytes:347059 (338.9 Kb)
ppp1為pptp連接建立的介面,mtu為1396,而我在/etc/ppp/options.pptpd中設置的mtu為 1450,和這個有關係么?/etc/ppp/options.pptpd的內容如下:
# more /etc/ppp/options.pptpd
lock
dump
logfd 2
logfile /var/log/pptpd.log
name SERVER
proxyarp
auth
mtu 1450
nobsdcomp
require-mschap-v2
#require-mppe-128
require-mppe
ipparam options.pptpd
《解決方案》
自己頂一下。。。。。