From DD-WRT Wiki
First, before you do anything else, check which version of the WRT350N you have. If you have V1, you're in business. If you have V2, you're outta luck.
 NEW WIKI INSTRUCTIONS
Flashing a virgin WRT350N with the default Linksys firmware will require a special "trailed" mini-build to be flashed first. You should use a build linked in number 3, below, for the initial flash. The name of this file specifically is "dd-wrt.v24_mini_wrt350n.bin". You may proceed to flash it with a generic build next, such as Mega.bin. Remember to do the 30/30/30 Hard Reset after every successful flash. It is absolutely essential.
The proper process for flashing is:
- Read Note 1 of the peacock announcement http://www.dd-wrt.com/phpBB2/viewtopic.php?t=51486
- Read Note 3 and 4 and the rest of the "required reading" sections of the peacock announcement
- Download svn 14929 dd-wrt.v24_mini_wrt350n.bin ftp://ftp.dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/2010/08-12-10-r14929/broadcom/dd-wrt.v24_mini_wrt350n.bin
- Do a HARD reset on your router. You will not get a password renewal page as you have stock linksys firmware on the router still.
- Plug a cable into the lan port of the router and your computer, and disable any wireless to the computer. Disable all firewalls and virus protection. (Setting your computer to a static IP should not be required)
- Set your browser to 192.168.1.1. This will open up the Linksys webgui
- Enter the username "admin" and password "admin"
- Go to the "administration" tab. Click on "firmware upgrade".
- BROWSE to the dd-wrt.v24_mini_wrt350n.bin, the file you downloaded.
- Click on the "upgrade" button and WAIT for the "upgrade successful" message. Wait at LEAST 5 minutes
- Power cycle your router. (very important) WAIT until you can relogin at 192.168.1.1
- Do another PROPER HARD 30-30-30 reset on your router (very important) WAIT until you can login at 192.168.1.1
- Click on any tab. Reset your username/password by TYPING in a new username/password
- Configure your router
You can now upgrade to any generic dd-wrt build except Micro. Be sure to always do a hard reset prior to flashing another build, do a power cycle followed by another hard reset after flashing, and NEVER re-use a configuration file from a previous build or another router. Reconfigure from scratch.
 OLD CRAPPY WIKI INSTRUCTIONS
++That said, if you have V1 (typically found in the USA) here is the basic procedure for installing dd-wrt on it:
1. Make sure you can access the Linksys GUI (typically 192.168.1.1) the default login/password is admin/admin
- If your login doesn't work, then someone changed the login and/or password and if you don't know it then RESET your router (hold the reset button in until it reboots, approx 20-30 seconds) which SHOULD return it to factory defaults.
2. Download and have accessible via a WIRED connection to your router BOTH the mini and the mega (NOT the micro) images. The mini image is specific for the 350N, the mega is whatever the latest generic mega image is.
3. Login to your Linksys GUI and cruise over to the Administration tab and select Reset to Factory defaults (yes, even if you just reset it.) Let that run for a couple of minutes. Your router should reboot on it's own. If after say, 5 minutes nothing has happened, then RESET again.
4. Go to the UPDATE FIRMWARE (still in the linksys GUI) page and browse over to the mini image you downloaded (see step 2) and FLASH away...
5. Don't do anything... not anything until the flash is done flashing and the router reboots on it's own.
6. When you log in to the dd-wrt GUI (192.168.1.1) you should see a change password screen. You have to enter a login and password, so just do it. Make it something you will remember.
7. Go to the update firmware page in your NEW GUI and browse on over to that shiny new mega image and update that firmware. Again. Wait, wait wait.
8. If all went well, when this is all done, you should be able to log in to the mega dd-wrt (it will say so up on the right hand side of the screen.)
9. If something isn't right and you've waited a while (no, not 30 seconds, at least 5 minutes) get up and walk away. After a few more minutes, if nothing is still happening - try resetting again like in step one. Now try logging in.
There are lots and lots of settings in dd-wrt. The 350n is a powerful router and now it's even more so. learn what it is capable of.