New official dd-wrt build - 17990 is out (EKO and BS)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6
Author Message
migv
DD-WRT Novice


Joined: 28 Apr 2012
Posts: 2

PostPosted: Sat Apr 28, 2012 23:10    Post subject: Reply with quote
@omahena: THANK YOU for your post regarding the logfd2 bug. I was having the same problem with 3 K26 builds (3 different routers): the VPN client wouldn't connect at all. I used vi to edit the options.vpn file and add the space before the "2" as you indicated, and the client started working. Thanks for posting this.
Sponsor
mike240se
DD-WRT Novice


Joined: 09 May 2012
Posts: 19

PostPosted: Wed May 09, 2012 4:51    Post subject: Re: PPTP Client Fix Reply with quote
omahena wrote:
In case anyone else has problems with the PPTP Client... I believe there were a few posts about that.

The problem is in the first option in the /tmp/pptpd_clients/options.vpn:

The option that reads:
Code:
logfd2


should read:
Code:
logfd 2


There is a space missing. A three days worth of space. Smile

What wasted most of my time was that I was unsure how to get the debug output from the PPTP client and PPP. I wasn't able to get any sort of output or log or anything useful.

The most I was able to do was to turn on the syslogd service and redirect it to my windows machine's syslogd service that I later modified to a syslogd console application.

Note that it is also possible to turn on the syslogd service in dd-wrt and not enter a remote Server. This implicitly means that the logs go to the system log in /var/log/messages. And the kernel startup log can be examined with dmesg.

What I found out later is that the lack of information from PPTP client means that there is something wrong in the /tmp/pptpd_clients/options.vpn config file.

The best way to debug your PPTP Client problems is to ssh to your router and test them by hand. You first stop whatever VPN madness is already running and then start the VPN debug stage. You do this like this:

Code:

root@gatekeeper:~# cd /tmp/pptpd_client/
root@gatekeeper:/tmp/pptpd_client# ./vpn stop
Killing VPN PID 2557
Killing PPTP PID 2584
VPN Stopped


Now if something is wrong in the options.vpn file your test will end up like this:
Code:

root@gatekeeper:/tmp/pptpd_client# ./vpn debug
Waiting.......
Removing PID file
PID file created
Attempting initial connect
Initial connection dropped
Attempting connect...
Connection dropped...
Attempting connect...
Connection dropped...


This very likely means that there is something wrong with the syntax of your PPTP client configuration and not with the values you entered in the dd-wrt admin web pages. And while an attempt is made to connect to the other side, the PPTP connection will soon be dropped.

If however you see this:

Code:
root@gatekeeper:/tmp/pptpd_client# ./vpn debug
Waiting.......
Removing PID file
PID file created
Attempting initial connect
pppd options in effect:
debug debug             # (from command line)
nodetach                # (from command line)
idle 0          # (from /tmp/pptpd_client/options.vpn)
persist         # (from /tmp/pptpd_client/options.vpn)
logfd 2         # (from /tmp/pptpd_client/options.vpn)
dump            # (from /tmp/pptpd_client/options.vpn)
noauth          # (from /tmp/pptpd_client/options.vpn)
refuse-eap              # (from /tmp/pptpd_client/options.vpn)
name xxx                # (from /tmp/pptpd_client/options.vpn)
password ??????         # (from /tmp/pptpd_client/options.vpn)
/dev/pts/0              # (from command line)
38400           # (from command line)
lock            # (from /tmp/pptpd_client/options.vpn)
mru 1450                # (from /tmp/pptpd_client/options.vpn)
mtu 1400                # (from /tmp/pptpd_client/options.vpn)
lcp-echo-failure 30             # (from /tmp/pptpd_client/options.vpn)
lcp-echo-interval 2             # (from /tmp/pptpd_client/options.vpn)
ipparam kelokepptpd             # (from /tmp/pptpd_client/options.vpn)
ip-up-script /tmp/pptpd_client/ip-up            # (from /tmp/pptpd_client/options.vpn)
ip-down-script /tmp/pptpd_client/ip-down                # (from /tmp/pptpd_client/options.vpn)
defaultroute            # (from /tmp/pptpd_client/options.vpn)
usepeerdns              # (from /tmp/pptpd_client/options.vpn)
nobsdcomp               # (from /tmp/pptpd_client/options.vpn)
nodeflate               # (from /tmp/pptpd_client/options.vpn)
mppc            # (from /tmp/pptpd_client/options.vpn)
mppe xxx # [don't know how to print value]              # (from /tmp/pptpd_client/options.vpn)


This means that PPTP Client understood all your options in the options.vpn file and you are ready to start tweaking your file.

Now... With a bit of bad luck I managed to waste two days on this part... Sad Hopefully nobody else has to.

But what I wasted another day on... Was making this bloody space appear in the options.vpn file. The problem is that the configuration files for the PPTP Client are not copied to /tmp during the the first stage of the startup of dd-wrt. I presume a few things have priority over that and that is OK... But it was quite tricky to start a script after dd-wrt creates the pptpd_client folder.

Of course the options.vpn file is re-created every time you change any settings in the admin pages so keep that in mind. I ended up writing two mechanisms - a delayed script from jffs triggered on ipup with an extra delay of 30s before options.vpn fixup. And if the settings are modified at a later time I scheduled a cron job to try and fixup the file every 60s if it contains the invalid option.

But to make things more complicated the cron refused to execute tasks for some reason. I suspect that this has to do with time synchronisation with a NTP server or simply because dd-wrt doesn't know the correct time and assumes it is 1.Jan.1970. This was fixed with another 20s delayed cron restart, and I have a sync to an NTP server configured.

Anyhow... I hope somebody can come up with a simpler solution but until then my PPTP Client is now up and running. I am tempted to mod the 18000 build for my E4200 and add that space... But perhaps it is better if we get an official build from Eko.

The simplest solution, if you have enough NVRAM, is to attempt a delayed fixup. I believe the best way is to use the NVRAM Startup script as it gets run only once, while the firewall script gets run four times on my system:

Code:

sleep 35
sed s/"logfd2"/"logfd 2"/g /tmp/pptpd_client/options.vpn > /tmp/opt.tmp
mv /tmp/opt.tmp /tmp/pptpd_client/options.vpn


It is not a great script but his should get you up and running. If your router is slower to start you may increase the delay from 35s to whatever works for you. And don't forget to restart the router if you change any PPTP Client settings in the web admin pages.

But I recommend a JFFS filesystem solution. Create three files:

/jffs/etc/fix_pptpc:

Code:
#!/bin/sh

if [ "$1" != "" ]; then
  sleep $1
fi

if [ -f "/tmp/pptpd_client/options.vpn" ]; then
  echo "PPTP Client file exists."
else
  echo "PPTP Client file does not exist yet... Exiting."
  exit
fi

export FND=`grep logfd2 /tmp/pptpd_client/options.vpn`

if [ "$FND" == "logfd2" ]; then
  echo "Fixing PPTP Client configuration..."
  sed s/"logfd2"/"logfd 2"/g /tmp/pptpd_client/options.vpn > /tmp/opt.tmp
  mv /tmp/opt.tmp /tmp/pptpd_client/options.vpn
else
  echo "PPTP Client file already fixed up."
fi


/jffs/etc/fix_cron:

Code:
#!/bin/sh

if [ "$1" != "" ]; then
  echo "Waiting for $1s before Cron Fixup..."
  sleep $1
fi

stopservice cron && startservice cron


/jffs/etc/config/fixups.ipup:
Code:
#!/bin/sh

export LOG=/tmp/var/log/fixups.log
echo "JFFS IP Up script" >> $LOG

echo "IPUp: Starting delayed fixup..." >> $LOG
/jffs/etc/fix_pptpc 30 &
/jffs/etc/fix_cron 20 &


Next, enter the cron job in the admin web interface (Aministration -> Management -> Cron)

Code:
* * * * * root /jffs/etc/fix_pptpc


This approach allows you to modify PPTP settings in the web interface and have them working in up to 60s without a router restart. And the settings will also be fixed up if the router is restart for some reason.

Right... This post is getting too long... Here is also the syslogd console application I tweaked for easier diagnostics: http://bxl.nano-ware.com/dd-wrt/. Requires .NET 3.5. If anyone wants sources let me know.

Enjoy & good luck.


You sir are a damn gentleman and a scholar.

I am 1 day into this and 1/2 a day into setting it all up as openvpn as i have 10 e2000's as vpn clients for these crappy lan time clocks that need to be on the same lan as the server.

with the e2000's dying at 1 every 90 days, my spare supply is up and i had to go with e2500. then this problem was driving me nuts and i cant backport on that router to older firmwares!

so thanks a million, it fixed the problem i am working on getting the fix on reboot working now Smile'

DEVS PLEASE merge this fix into SVN! I beg ye Smile

EDIT: it was fixed in 18965! yay! but how do i get that build? is there any way to get that with nv60k?
crashfly
DD-WRT Guru


Joined: 24 Feb 2009
Posts: 2026
Location: Sol System > Earth > USA > Arkansas

PostPosted: Thu May 10, 2012 0:47    Post subject: Re: PPTP Client Fix Reply with quote
mike240se wrote:
EDIT: it was fixed in 18965! yay! but how do i get that build? is there any way to get that with nv60k?

Only when the next developmental "release" comes out. Hopefully that will be in a few days.

_________________
E3000 22200M KongVPN K26
WRT600n v1.1 refirb mega 18767 BS K24 NEWD2 [not used]
WRT54G v2 16214 BS K24 [access point]

Try Dropbox for syncing files - get 2.5gb online for free by signing up.

Read! Peacock thread
*PLEASE* upgrade PAST v24SP1 or no support.
mike240se
DD-WRT Novice


Joined: 09 May 2012
Posts: 19

PostPosted: Thu May 10, 2012 4:06    Post subject: Re: PPTP Client Fix Reply with quote
crashfly wrote:
mike240se wrote:
EDIT: it was fixed in 18965! yay! but how do i get that build? is there any way to get that with nv60k?

Only when the next developmental "release" comes out. Hopefully that will be in a few days.



Wow could it be that soon? I sure hope so and that would be great as I have decided to wait for the fix'ed dev release rather than use the patch as I need it to be as reliable as possible and I see potential issues with the patch as great as it is.
Wyswig
DD-WRT Novice


Joined: 09 Jul 2012
Posts: 1

PostPosted: Mon Jul 09, 2012 18:40    Post subject: Problem with Netgear WNDR3400v1 -- can't upgrade Reply with quote
I recently took the plunge and attempted to update a Netgear WNDR3400v1 to dd-wrt.

Following the wiki links etc I used the working build listed at that time for the initial flash. I downloaded this file on May 31,2012.

dd-wrt.v24-17990_NEWD-2_K2.6_mini-WNDR3400.chk

I followed all the normal steps with a 30/30/30 reset as this is my 4-5th router converted to dd-wrt.

This build appears to be fully functional but has an interesting issue. After the initial flash I can't upgrade it. I can try any of the later builds from:

ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/

or others from the same build version family for the WNDR3400v1 but none will load.

If you use the gui the process appears to upload the file but after two seconds it completes but never flashes.

A manual copy of the bin file to /tmp and using the write command also fails with similar behavior. Two seconds of execute then ssh logs out of the system but to no effect.

I have also attempted to use the factory utility from Netgear to TFTP the original firmware back to the router but that also fails to update or make any changes.

Versions that I have attempted to update with are:

dd-wrt.v24-18777_NEWD-2_K2.6_std_usb_nas.bin
dd-wrt.v24-19342_NEWD-2_K2.6_mini-WNDR3400.chk
dd-wrt.v24-19342_NEWD-2_K2.6_mini-WNDR3400_CVNA.chk
dd-wrt.v24-19342_NEWD-2_K2.6_mini_usb_nas.bin
dd-wrt.v24-19342_NEWD-2_K2.6_std_nokaid_small.bin
dd-wrt.v24-19342_NEWD-2_K2.6_std_usb_nas.bin

While I am thankful the device isn't bricked I would like to upgrade it further or revert it to the original firmware. Any additional advice or tips to help resolve this would be appreciated.

FOLLOW-UP:

I was able to get this to update using the mega version:

ftp://ftp.dd-wrt.com/others/eko/V24-K26/svn17990/dd-wrt.v24-17990_NEWD-2_K2.6_mega-nv64k.bin

This seems to work fine and I'm continuing to test.

Much of the upgrade process for the WNDR3400v1 can be found here:

http://cyberpunx.com/2011/11/installing-dd-wrt-on-netgear-wndr3400-n600/#more-70
Goto page Previous  1, 2, 3, 4, 5, 6 Display posts from previous:    Page 6 of 6
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum