My provider requires me to use PPTP to connect to the internet.
It also requires WAN port to have specific MAC, IP and gateway.
I need to configure my OpenWRT router to connect to it. (Router details are in the end of the post.)
But LUCI does not allow me to configure static IP with PPTP connection. (that option is only visible when "static ip" is selected)
The solution on the FAQ does not work, and i don't know how to troubleshoot it.
Please help.
-----------------------------------------------------------
I already established the connection in a standard linux way:
# Configure the physical WAN port. This is REQUIRED.
ifconfig eth0.2 hw ether 00:C3:91:6B:82:2A
ifconfig eth0.2 10.31.6.22 netmask 255.0.0.0
ifconfig eth0.2 up
# Routing (this should be that way by default, so the following line is not required)
route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.0.0.2 dev eth0.2
# Start PPTP client. (see config files below)
/usr/sbin/pppd call pptpconnection
# Wait for connection to be established, then add default route
# ("defaultroute" option does not work at all for me)
sleep 10
route add default dev ppp0
# Now setup NAT (85.93.137.42 is my static internet IP):
iptables -t nat -F
iptables -P FORWARD ACCEPT
iptables -t nat -A POSTROUTING -s 192.0.0.0/8 -d 10.0.0.0/8 -o eth0 -j SNAT --to-source 10.31.6.22
iptables -t nat -A POSTROUTING -s 192.0.0.0/8 -o ppp0 -j SNAT --to-source 85.93.137.42
PPP is configured as follows:
vpn1234 PPTP P@$5w0rD
PPTP vpn1234 P@$5w0rD
pty "pptp 10.0.0.2 --nolaunchpppd"
connect /bin/true
name vpn1234
remotename PPTP
lock
nobsdcomp
nodeflate
require-chap
defaultroute
persist
debug
noauth
-----------------------------------------------------------
My router is DIR-300 Rev A (Atheros 183 MHz, 4MB Flash)
I have latest OpenWRT "Backfire RC3 (r22752)".
I have installed all required packages. (PPP, PPTP, kmod-ppp, kmod-gre, etc)
I understand basic networking and know how to use vi, sh, etc.
My provider requires following config:
WAN MAC=00:C3:91:6B:82:2A
WAN IP=10.31.6.22
WAN NetMask=255.0.0.0
WAN GateWay=10.0.0.2
PPTP-Server=10.0.0.2
PPTP Login=vpn1234
PPTP Password=P@$5w0rD (this is not my real password)
PPTP Auth=CHAP or MSCHAPv2
PPTP Encryption=Forbidden
PPTP Compression=Forbidden
PPTP IP,NetMask,GateWay=Auto
-----------------------------------------------------------
root@OpenWrt:~# ifconfig
ath0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1183 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:413776 (404.0 KiB)br-lan Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.177.1 Bcast:192.168.177.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:464682 errors:0 dropped:0 overruns:0 frame:0
TX packets:283969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:536493169 (511.6 MiB) TX bytes:118535504 (113.0 MiB)eth0 Link encap:Ethernet HWaddr 00:22:44:66:88:00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:778765 errors:0 dropped:0 overruns:0 frame:0
TX packets:806368 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:677149355 (645.7 MiB) TX bytes:656730316 (626.3 MiB)
Interrupt:4 Base address:0x1000eth0.1 Link encap:Ethernet HWaddr 00:22:44:66:88:00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:464682 errors:0 dropped:0 overruns:0 frame:0
TX packets:283969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:538351897 (513.4 MiB) TX bytes:119671380 (114.1 MiB)eth0.2 Link encap:Ethernet HWaddr 00:C3:91:6B:82:2A
inet addr:10.31.6.22 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:313935 errors:0 dropped:0 overruns:0 frame:0
TX packets:522397 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:127883801 (121.9 MiB) TX bytes:537057851 (512.1 MiB)lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:855 (855.0 B) TX bytes:855 (855.0 B)ppp0 Link encap:Point-to-Point Protocol
inet addr:85.93.137.42 P-t-P:85.93.128.114 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:287129 errors:0 dropped:0 overruns:0 frame:0
TX packets:445997 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:113998478 (108.7 MiB) TX bytes:508999313 (485.4 MiB)wifi0 Link encap:UNSPEC HWaddr 00-11-22-33-44-55-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:654 errors:0 dropped:0 overruns:0 frame:59
TX packets:1722 errors:16 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:195
RX bytes:50275 (49.0 KiB) TX bytes:527865 (515.4 KiB)
Interrupt:3 Memory:b0000000-b000ffff
root@OpenWrt:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
85.93.128.114 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.177.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
10.0.0.0 10.0.0.2 255.0.0.0 UG 0 0 0 eth0.2
10.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 eth0.2
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.177.13 0.0.0.0 UG 0 0 0 br-lan
0.0.0.0 10.0.0.2 0.0.0.0 UG 0 0 0 eth0.2
(Last edited by Shambler0 on 12 Nov 2010, 00:12)