Configuring L2TP client with static ip adress of ethernet port
From DD-WRT Wiki
Revision as of 08:22, 28 November 2010 (edit) Wonder (Talk | contribs) (New page: Introduction I didn't find a way to configure from the GUI DD-WRT firmware to connect to L2TP server , if there is no valid DHCP server in the network. Here is my solution of that proble...) ← Previous diff |
Revision as of 08:25, 28 November 2010 (edit) (undo) Wonder (Talk | contribs) Next diff → |
||
Line 16: | Line 16: | ||
That is the final list of commands added to startup (Administration-Commands-Startup): | That is the final list of commands added to startup (Administration-Commands-Startup): | ||
+ | |||
ifconfig vlan1:0 inet 10.23.128.*** netmask 255.255.255.*** | ifconfig vlan1:0 inet 10.23.128.*** netmask 255.255.255.*** | ||
+ | |||
route add 10.200.0.1 gw 10.23.128.*** | route add 10.200.0.1 gw 10.23.128.*** | ||
+ | |||
while true; do route del 10.200.0.1 gw 192.168.1.1 ; sleep 10; done | while true; do route del 10.200.0.1 gw 192.168.1.1 ; sleep 10; done | ||
+ | |||
In the Connection Type in Setup section enter L2TP, enter server ip adress, your username&&password. | In the Connection Type in Setup section enter L2TP, enter server ip adress, your username&&password. | ||
That's all, it should work. | That's all, it should work. |
Revision as of 08:25, 28 November 2010
Introduction
I didn't find a way to configure from the GUI DD-WRT firmware to connect to L2TP server , if there is no valid DHCP server in the network. Here is my solution of that problem.
Setup
So, you have a static ip, netmask && default route && dns servers, as well as ip adress of L2TP server. In order to be able to access VPN server, I created vlan1:0 alias, then add static route to L2TP server, and finally add it to startup commands.
Here it is : L2TP server adress : 10.200.0.1, gateway 10.23.128.*** My statis IP configuration from inet provider: 10.23.128.*** netmask 255.255.255.***
I noticed that there is a DHCP server in the network, but it gives me strange and unusable ip adress, 192.168.1.* and also sets my default route to 192.168.1.1. I had to delete it manually.
That is the final list of commands added to startup (Administration-Commands-Startup):
ifconfig vlan1:0 inet 10.23.128.*** netmask 255.255.255.***
route add 10.200.0.1 gw 10.23.128.***
while true; do route del 10.200.0.1 gw 192.168.1.1 ; sleep 10; done
In the Connection Type in Setup section enter L2TP, enter server ip adress, your username&&password.
That's all, it should work.