Page 1 of 2

Router Firmware upgrade

Posted: Fri Apr 04, 2003 7:53 pm
by [PX] Nebuchadnezzar
The D-Link site says, and I slightly agree: "If it's not broken, don't fix it."

but is it worth the risk to upgrade the firmware on my router? and also, is it customizable?

Posted: Sat Apr 05, 2003 12:57 am
by [Fallen]Thumperup
Why do you need a firmware upgrade ????

Isn't it working ?????

Posted: Sat Apr 05, 2003 1:00 am
by [PX] Nebuchadnezzar
yes, it works. My question is, is it worth the risk for a newer firmware version?

Posted: Sat Apr 05, 2003 1:02 am
by [Fallen]Thumperup
Not if it doesn't fix a problem that is occuring

Posted: Sat Apr 05, 2003 4:20 am
by THE JEW (RaVeN)
Engineer saying:

If it ain't broke, it doesn't have enough features!




Though, if it works, don't bother. Though, I remember something about either Linksys or D-link having a critical flaw that allowed hackers to get past the firewall. Don't remember which one, though. May wanna look into it. It was solved by a firmware upgrade.

Posted: Sat Apr 05, 2003 11:08 am
by [PX] Nebuchadnezzar
knowing which company it was would be usefull information, J..... :p

Posted: Sat Apr 05, 2003 1:40 pm
by [Fallen]Thumperup
That would have to be Dlink with the flaw in the firewall, because we all know linksys is better.

Re: Router Firmware upgrade

Posted: Sun Aug 08, 2010 7:02 pm
by THE JEW (RaVeN)

Re: Router Firmware upgrade

Posted: Thu Sep 29, 2011 10:11 am
by THE JEW (RaVeN)

Re: Router Firmware upgrade

Posted: Sat Aug 09, 2014 9:24 pm
by THE JEW (RaVeN)
Tp-link TL-WDR3600

Dd-wrt print server
http://arouter.blogspot.com.br/2011/07/ ... e.html?m=1
Print Server for DD-WRT (simple version)
Since there's USB port on the router, any normal USB printer can become a network printer. As the router is usually on 24x7, there is no need to invest in a (usually overpriced) dedicated printer server.

The printer server program that we use here is p910nd. It's a very small (only 8KB) daemon which simply redirects all printing command from a PC to the printer. Setting up p910nd on the router can be a snap or very comprehensive, depends on the printer. The best scenario would be sharing a Postscript/PCL compatible one, which will be covered here.

Before we start, you'll need a USB hub if your router has only one USB port, because we now need to connect a USB drive and a USB printer. As I said previously, I recommend a self-powered hub to prevent any power draw issues.


Make sure the USB printer support is selected.
In the web interface, under Services > USB
* Enable 'USB Printer Support'
* Click Apply Settings

Install p910nd server and run it as a service
Log in from PuTTY and run

opkg install p910nd

Now create /opt/etc/init.d/p910nd (delete all previous contents if the file is not empty)

source /mnt/root/.profile
mkdir -m 755 -p /dev/usb
mknod -m 660 /dev/usb/lp0 c 180 0
sleep 1
P910ND='/opt/usr/sbin/p910nd'
kill -9 $(pidof p9100d)
${P910ND} -b -f /dev/usb/lp0 0

Then set it to run as a service

chmod a+x /opt/etc/init.d/p910nd
ln -s /opt/etc/init.d/p910nd /opt/etc/init.d/S30p910nd

Reboot or manually run /opt/etc/init.d/p910nd to make the change take effect.

Extra: using two printersUse this script instead

source /mnt/root/.profile
mkdir -m 755 -p /dev/usb
mknod -m 660 /dev/usb/lp0 c 180 0
mknod -m 660 /dev/usb/lp1 c 180 1
sleep 1
P910ND='/opt/usr/sbin/p910nd'
killall -9 p910nd
${P910ND} -b -f /dev/usb/lp0 0
${P910ND} -b -f /dev/usb/lp1 1

Install printer in Windows
So we have p910nd running in the router now back to the PC (and Windows). First, you need to have the printer driver installed on the local computer. Exact procedures depend on the printer, but a foolproof way is to plug the printer into the PC then run a manufacturer provided driver setup.

After driver installation, in Windows XP, follow this guide.

I can't find a detailed guide for Windows 7 but its essentially the same as earlier Windows editions. Anyway, here is a quick one:

For Windows 7, Open Control Panel > Hardware and Sound > Devices and Printers, then right click the printer icon. Select "Printer Properties" then click the "Ports" tab on the properties window.

The default port might be USB001 that's for local USB port. Click "Add Port..." button, then select "Standard TCP/IP Port" from the list. Click "New Port..." which will open "Add Standard TCP/IP Printer Port Wizard". Click next and fill the "Printer Name or IP Address" with router's IP.

add-printer-1

After clicking "Next", Windows will try to detect the printer port and will fail. That's OK. On the next page, select "Custom" then click "Settings...". This will bring you another window, the default setting with Protocol Raw and Port Number 9100 should work. Confirm the change then back to original "Ports" tab. Select the newly added 192.168.1.1 port as default and click "Apply".

Now plug the printer back to router and try to print from Windows machine.
This is a ten-minute job, if your printer is well supported aka Linux friendly. However, things can get nasty for some GDI printers. Also, you might want the p910nd to run only when the printer is connected. To solve all these problems, we need to make the router aware of printer's status change (plugging or removal) and run commands upon that. This is called hotplug and we can make some really neat solutions with that.

General print server
http://www.dd-wrt.com/wiki/index.php/US ... er_sharing
General info
http://www.dd-wrt.com/phpBB2/viewtopic. ... on+wdr3600

Roundup
http://www.flashrouters.com/blog/tag/be ... nd-dd-wrt/

Re: Router Firmware upgrade

Posted: Thu Feb 05, 2015 12:43 pm
by THE JEW (RaVeN)
Asus WL-520GU and DD-WRT

Wiki
http://www.dd-wrt.com/wiki/index.php/Asus_WL-520GU
I'm 50/50 successful with Asus update utility. TFTP worked when the Asus program wouldn't. It does not seem to work unless the IP set to 192.168.1.1 as my un-reset-able one would not flash with an IP of 192.168.1.50
I'm 50/50 successful with the Window's Telnet utility. Putty worked when Windows wouldn't.

Peacock thread (aka Broadcom based routers and upgrades for them)
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486

Basic overview on setup
https://sites.google.com/site/wl520gu/

Asus, TFTP Flash, and You
http://www.dd-wrt.com/wiki/index.php/Asus_TFTP_Flash

Telent/SSH Into Your Router
http://www.dd-wrt.com/wiki/index.php/Te ... mmand_Line

Hard Reset (aka 30/30/30) an Asus Router
http://www.dd-wrt.com/wiki/index.php/Ha ... r_30/30/30
I have found that after the hard reset, a power cycle is required.
I have found that I cannot log into the GUI when in Recovery Mode.
I'm 50/50 successful doing a 30/30/30 on the stock firmware. The router would not reset......at all. I got lucky in that it still used the stock firmware. 10 second hold also didn't work.

Recover From a Bad Flash
http://www.dd-wrt.com/wiki/index.php/Re ... _Bad_Flash
Just take your time, do it right, and you won't have to bother with this nonsense.

I couldn't get the print server to work with v24preSP2 (beta) v13064. I had a standalone print server so I passed on it (input appreciated, though). I've had success running v13064 and v14896. You lose USB on the 2nd version.

Re: Router Firmware upgrade

Posted: Thu Feb 05, 2015 2:57 pm
by THE JEW (RaVeN)

Re: Router Firmware upgrade

Posted: Mon Feb 09, 2015 10:00 am
by THE JEW (RaVeN)

Re: Router Firmware upgrade

Posted: Wed Feb 18, 2015 5:07 pm
by THE JEW (RaVeN)

Re: Router Firmware upgrade

Posted: Thu Feb 19, 2015 1:18 pm
by THE JEW (RaVeN)
DD-WRT as a WAP.

Setup:
-Dlink DIR-615C1 flashed to v24-sp2 (03/25/13) - build 21061
-wireless router set to router only
-connected to LAN via Ethernet cable
-DHCP off
-1 "main" wireless network
-2 guest wireless networks
-no filtering on physical ports

This was a bit of PITA to figure out for me so I've put it here for my recollection when I need it. It will likely be obvious to network gurus (which I am obviously not). Most of the guides out there assume you use DD-WRT as your main router and not as a WAP. If you use pf as your main router/gateway, the guides do not work.

Setup
->Basic Setup
1. Turn DHCP off.
2. Leave all dnsMasq options on (I have 3 in my setup--Use DNSMasq for DHCP, Use DNSMasq for DNS, DHCP-Authoritative).
3. I disable the "WAN" and I "Assign WAN Port to Switch" to gain another port.
4. Assign ip info to router.
5. Assign DNS and Gateway info.

->Advanced Routing
1. Set "Operating Mode" to Router.
2. "Dynamic" Routing disabled.

Wireless
->Basic Settings
1. Set up your "Main" network as you like.
2. I assign channel to the ip I gave the router to keep management easy.
3. Under "Virtual Interfaces," add your 2 virtual wireless networks. Assign SSID, etc. Make sure "Network Configuration = Bridged" under "Advanced."
4. I disable "AP Isolation." This is controversial. It opens you up to others seeing what's on your virtual network (ie. less secure). However, with it enabled then 2 kids with their Nintendo DS's can't play each other over wifi or you can't use Chromecast. A bummer for guests. Your call.

->Wireless Security
1. Secure as you see fit.

Services
->Services
1. Enable all 3 dnsMasq options (DNSMasq, Local DNS, No DNS Rebind).
2. Add something similar to this to "additional dnsMasq options"

Code: Select all

interface=br1
dhcp-option=br1,3,192.168.xxx.1
dhcp-range=br1,192.168.xxx.100,192.168.xxx.115,255.255.255.0,24h
interface=br2
dhcp-option=br2,3,192.168.xxx.1
dhcp-range=br2,192.168.xxx.100,192.168.xxx.110,255.255.255.0,24h
Choose whatever octets you like. The 1rst ip in ranges sets your first ip, the 2nd your last. 24h is the lease time.


Security
->Firewall
1. "Filter Multicast" should be checked.
2. You can then disable or leave the SP1 Firewall enabled. I left it enabled, but many suggest to disable it.

Administration
->Commands
1.

Code: Select all

iptables -t nat -I POSTROUTING -o `get_wanface` -j SNAT --to `nvram get wan_ipaddr`
iptables -I FORWARD -i br1 -m state --state NEW -j ACCEPT
iptables -I FORWARD -i br2 -m state --state NEW -j ACCEPT
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
iptables -I FORWARD -i br0 -o br1 -m state --state NEW -j DROP
iptables -I FORWARD -i br0 -o br2 -m state --state NEW -j DROP
iptables -I FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP
iptables -I FORWARD -i br2 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP
iptables -t nat -I POSTROUTING -o br0 -j SNAT --to `nvram get lan_ipaddr`
iptables -I INPUT -i br1 -m state --state NEW -j DROP
iptables -I INPUT -i br2 -m state --state NEW -j DROP
iptables -I INPUT -i br1 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br2 -p udp --dport 67 -j ACCEPT
iptables -I INPUT -i br1 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport 53 -j ACCEPT
iptables -I INPUT -i br2 -p udp --dport 53 -j ACCEPT
iptables -I INPUT -i br2 -p tcp --dport 53 -j ACCEPT
iptables -I INPUT -i br1 -p tcp --dport telnet -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br1 -p tcp --dport ssh -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br1 -p tcp --dport www -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br1 -p tcp --dport https -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br2 -p tcp --dport telnet -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br2 -p tcp --dport ssh -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br2 -p tcp --dport www -j REJECT --reject-with tcp-reset
iptables -I INPUT -i br2 -p tcp --dport https -j REJECT --reject-with tcp-reset
They MUST be done in that order.

2. Do NOT use this code:

Code: Select all

iptables -I FORWARD -i br1 -o br0 -m state --state NEW -j DROP
Every guide seems to have it. It does not work if your DD-WRT is a WAP.

3. Do NOT use this code if you want your virtual wireless networks to access the internet:

Code: Select all

iptables -I FORWARD -i br1 -o `get_wanface` -j DROP
4. Do NOT use this code as it does not jive with WAP's.

Code: Select all

iptables -I FORWARD -i br1 -d `nvram get wan_ipaddr`/`nvram get wan_netmask` -m state --state NEW -j DROP

This setup allows br1 and br2 to access the internet, but does not allow them to access the router or your main network. Subtract all the br2 stuff if you only want 1 virtual guest wireless network.

Shibby Tomato to follow once I figure it out.