PPTP and iptables
Man-wai CHANG
mwchang
Fri Jan 13 05:11:06 PST 2006
How could I make the WInXP client to browse internet? 192.168.11.x is
the internet interface on the linux machine. 10.1.x.x is the VPN
connection. After the VPN is up, the default gateway at the WinXP
changed to 10.1.0.2.
On the WinXP side:
Ethernet adapter:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 192.168.11.249
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.11.1
PPP adapter softmedia:
Connection-specific DNS Suffix . :
IP Address. . . . . . . . . . . . : 10.1.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 10.1.0.2
d:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x10003 ...00 11 d8 d6 ce 07 ...... SiS 900-Based PCI Fast Ethernet Adapter
cket Scheduler Miniport
0x60004 ...00 53 45 00 00 00 ...... WAN (PPP/SLIP) Interface
===========================================================================
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface
0.0.0.0 0.0.0.0 10.1.0.2 10.1.0.2
0.0.0.0 0.0.0.0 192.168.11.1 192.168.11.249
10.1.0.2 255.255.255.255 127.0.0.1 127.0.0.1
10.255.255.255 255.255.255.255 10.1.0.2 10.1.0.2
59.148.229.22 255.255.255.255 192.168.11.1 192.168.11.249
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1
192.168.11.0 255.255.255.0 192.168.11.249 192.168.11.249
192.168.11.249 255.255.255.255 127.0.0.1 127.0.0.1
192.168.11.255 255.255.255.255 192.168.11.249 192.168.11.249
224.0.0.0 240.0.0.0 192.168.11.249 192.168.11.249
224.0.0.0 240.0.0.0 10.1.0.2 10.1.0.2
255.255.255.255 255.255.255.255 10.1.0.2 10.1.0.2
255.255.255.255 255.255.255.255 192.168.11.249 192.168.11.249
Default Gateway: 10.1.0.2
===========================================================================
Persistent Routes:
None
On linux side:
[root at linux sysconfig]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.1.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.11.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 192.168.11.1 0.0.0.0 UG 0 0 0 eth0
[root at linux etc]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:13:20:CF:4A:A7
inet addr:192.168.11.250 Bcast:192.168.11.255 Mask:255.255.2
inet6 addr: fe80::213:20ff:fecf:4aa7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6873 errors:0 dropped:0 overruns:0 frame:0
TX packets:5852 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1004726 (981.1 KiB) TX bytes:769861 (751.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:242 errors:0 dropped:0 overruns:0 frame:0
TX packets:242 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:62691 (61.2 KiB) TX bytes:62691 (61.2 KiB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:10.1.0.1 P-t-P:10.1.0.2 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:248 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:31697 (30.9 KiB) TX bytes:3120 (3.0 KiB)
--
.~. http://changmw.homeip.net
/ v \ Linux 2.6.15
/( _ )\ (Ubuntu 5.10) 18:03:01 up 2 days 1:31
^ ^ load average: 0.02 0.04 0.01
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
More information about the Linux-users
mailing list