As in many situations the network administrator has task of connecting to remote systems to perform his duties. Ocassionally, the remote tasks become more difficult and frustrating when there are no remote tools available on the system and the remote desktop application is deactivated. Forturnately, Microsoft has provided a means for resolving such problems and therefore restoring back the hope of the administrator.
PsExec is one of the many PsTools Microsoft has provided for network administrors for the sole purpose of system administration. The following steps will show you how to activate RDP remotely from your local computer with the use of PsExec.
1.) Download the official PsTools either from microsoft directly or here
2.) Extract the downloaded file
3.) Just copy PsExec.exe from the extracted location into your executable path ”C:\Windows\System32″.
4.) Open the prompt command line (start -> Run and type “cmd” + OK) and enter the following:
computerDirect PsExec to run the application on the computer or computers specified. If you omit the computer name PsExec runs the application on the local system and if you enter a computer name of “\\*” PsExec runs the applications on all computers in the current domain.
@fileDirects PsExec to run the command on each computer listed in the text file specified.
-aSeparate processors on which the application can run with commas where 1 is the lowest numbered CPU. For example, to run the application on CPU 2 and CPU 4, enter: “-a 2,4″
-cCopy the specified program to the remote system for execution. If you omit this option then the application must be in the system’s path on the remote system.
-dDon’t wait for application to terminate. Only use this option for non-interactive applications.
-eDoes not load the specified account’s profile.
-fCopy the specified program to the remote system even if the file already exists on the remote system.
-iRun the program so that it interacts with the desktop of the specified session on the remote system. If no session is specified the process runs in the console session.
-lRun process as limited user (strips the Administrators group and allows only privileges assigned to the Users group). On Windows Vista the process runs with Low Integrity.
-nSpecifies timeout in seconds connecting to remote computers.
-pSpecifies optional password for user name. If you omit this you will be prompted to enter a hidden password.
-sRun remote process in the System account.
-uSpecifies optional user name for login to remote computer.
-vCopy the specified file only if it has a higher version number or is newer on than the one on the remote system.
-wSet the working directory of the process (relative to the remote computer).
-xDisplay the UI on the Winlogon desktop (local system only).
-prioritySpecifies -low, -belownormal, -abovenormal, -high or -realtime to run the process at a different priority. Use -background to run at low memory and I/O priority on Vista.
Most linux distribution uses the zero configuration network ( ZEROCONF) suite to automatically configure themselves and communicate on a network without the need of DHCP or DNS servers. ZEROCONF is an IETF organ that planned and coordinated a series of dynamic protocols to allow many operating systems to automatically configure themselves.
ZEROCONF commonly referred to as IPv4 Link-Local (IPv4LL) and Automatic Private IP Addressing (APIPA) utilises the 169.254.0.0/16 network address to auto-configure a network interface. It uses a series of unanswered “ARP” queries and then assumes an address if the queries yield an empty result. As a result, a route to the ZEROCONF network is added to the routing table by the network initscripts. Example:
ZEROCONF can be disabled by adding the following entry to the “/etc/sysconfig/network” configuration file.
[bash] # vi /etc/sysconfig/network
NOZEROCONF=yes or no(either answer will disable the “ZEROCONF route”)
It is important to note that the value of the “NOZEROCONF” parameter can actually be set to any value. The initscripts can only check to determine whether the parameter has a zero length or not. In other words, setting “NOZEROCONF=no” will have the same effect as setting it to “yes”. In order to reactivate ZEROCONF, the above entry “NOZEROCONF=yes/no” will have to either be commented out or removed entirely.
The network service must be restarted for the changes above to take effect.
[bash] # vi /etc/init.d/network restart
To see if the ZEROCONF route has been disabled, we have to check the routing table again.
If you ever wonder and want to know more about the the makeup and history of the ZEROCONF, check this very informative zeroconf article written by John C. Welch and this zeroconf article on wikipadia.
First and foremost, it has to be stated that I am not the author of the original article on this topic. The original article can be found here.
Now, why repeat the same thing here?
Well, on June 10th, 2009, I wrote a reply on this post while in search of a solution for exactly the same purpose as RickNY (The original Author). Back then, I was able to setup my OpenVPN with the help found on various forums. For some reason, I had to change my configurations… which required a different setup. Stupid enough, I made no backup or maybe I did but couldn’t find one, when I needed exactly the same configuration again.
Knowing fully well that I was part of such a discussion before somewhere, I had to google for sometime before I was able to find the the above address again. This time I knew I had to write a backup on my blog.
If you’re seeing this for the first time, just go ahead and try it. I hope it solves your problem. If you’ve seen this somewhere before, please forgive me for the repetition
Enough of the explanation…!
Why two instances of OpenVPN?
First of all, I have a full-time and part-time Job as a system engineer. In both of my offices, I always have to go through proxies to browse the internet.
Secondly, I have a small private business that requires my attention as well. To achieve this goals, I need to be able to channel my private activities securely through the proxies no matter the protocol been used.
The best solution would be to run double instances of OpenVPN on my private office gateway.
Requirements:
———————
1.) A compatible router running DD-WRT v24-sp2 (I have WRT54GL v1.1)
================== End Firewall ==================
That’s it! I hope it helps someone like me…
Hey! no matter the amount of bugs you might get… don’t blame me. Everything in life is risk
Remeber Tom Jones? The very best in life is always free!!! Enjoy!
I use an official Notebook which I often take home when dealing with official projects. The problem is I only have one Network Adaptor or LAN device on this machine. As a result, the network configurations in both locations becomes very tricky. As a network engineer, I know there are other possibilities of solving this problem but I just thought this little batch program might help someone else.
Just copy and past the content between “Start” and “End” on a file using notpad or other editing tools. Save and name the file what you want, run and follow the instructions. Enjoy and share!
@echo off
cls
Echo ————————— Switch IP Address ——————————————————–
Echo (c) 2010 omotech computer services
Echo This Program was written on March 24, 2010 by Stanley O. Omoregie.
Echo It allow the easy switch of IP Address settings between two networks.
Echo The program is copyrighted and can only be used and distributed as it is,
Echo without removing this copyright information.
Echo —————————————————————————————————————–
echo Choose between A und B:
echo [A] Set Static IP Address (Office)
echo [B] Set DHCP (Home)
echo.
echo Choose between A und B:
echo [A] Set Static IP Address (Office)
echo [B] Set DHCP (Home)
:choice
SET /P C=
Echo.
Echo.[A,B]
for %%? in (A) do if /I “%C%”==”%%?” goto A
for %%? in (B) do if /I “%C%”==”%%?” goto B
goto choice
:A
@ECHO off
echo Please enter IP Adresse for choice [A]:
set /P IP_Addr=
echo Default Gateway:
set /P D_Gate=
echo Subnet Mask:
set /P Sub_Mask=
echo Setting static IP Address&
netsh interface ip set address “LAN” static %IP_Addr% %Sub_Mask% %D_Gate% 1
ECHO Here is the setting information for %computername%:
netsh int ip show config
pause
goto end
:B
@ECHO OFF
ECHO DHCP is resetting the IP Address and Subnet Mask.
netsh int ip set address name = “LAN” source = dhcp
ipconfig /renew
ECHO Here is the setting information for %computername%:
netsh int ip show config
pause
goto end
:end
Script END!
:::::::::::::::::::::::::::::::::: End ::::::::::::::::::::::::::::::::::::::::
I made an EXE file from the batch program. You can download this to get both files.
This tutorials shows how the router Linksys WRT54G Version 1.1 (serial number starts with reflashing CL7B) with DD-WRT. Through this process, the capabilities of the router to be expanded. Flashing takes place in two stages: the first section needs to be flashed with the mini version of DD-WRT. The second section is then flashed with the standard version of DD-WRT. Warning: By flashing one can possibly lose warranty claims. Everything at your own risk. Details:
The Network cable to port 1 (1) The WRT54GLv1.1 is connected to the power supply, which in turn depends on the socket.
A blue network cable is connected to Port 1. (2) Ports 2, 3, or 4 may be used as well. However, port 1 has been chosen for this example and worked successfully. The other ports remain free. Better safe than sorry. The flash process should not be disturbed.
The network cable (3) is connected to the central unit. The computer is currently not connected to the internet, but only to the WRT54GLv1.1
DD-WRT Download-Section(4) Now, connect to the internet with a second computer and click on the link: DD-WRT Download-Section. (5) Note that there are several versions of DD-WRT. (6) The current version is 23 SP1. Click on the version dd-wrt.v23 SP1.
DD-WRT version 23 SP1(7) This takes you to where other categories of version SP1 is been offered. (8) This is a micro-version. This is for example made for the lousy WRT54G version 5. The WRT54G version 5 has only 2 MB flash memory. In the previous versions, there were more memory. (9) Fortunately, WRT54GLv1.1 has 4 MB flash memory. For this reason, we can choose for the router modell the mini-version. (10) The standard version is suitable for professional use. (11) There is also a version forVoIP. It would be very interesting to know whether this version adds significant value to the standard version, if you want to use Internet telephony. (12) And then there’s a version withOpenVPN.
DD-WRT version 23 SP1 (mini) (13): We have to decide in this case for the mini version. (14) A dialog box opens to download the mini-version of DD-WRT version 23 SP1. (15) It doesn’t matter whether you “choose Open with CompressedFolder” or “on floppy / hard disk space”. (16) Click OK.
Files are downloaded (17) For a brief moment will later be shown that all files have been downloaded
dd-wrt.v23_sp1_mini.zip extract (18) on your own computer is now the packed file “dd-wrt.v23_sp1_mini.zip.” By clicking the right mouse button on the file. (19) Select 7-Zip. (20) Select »Extract here«
dd-wrt.v23_mini_generic.bin(21): Take a look at the extracted files. There are several router models for special specifications of the mini-version. If you want to flash a different router than the model discussed here, then you should better look on the Internet for other instructions. In the present case (WRT54GLv1.1), will be flashed with dd “-wrt.v23_mini_generic.bin”.
eset the router by pressing with a pen (22) the reset button for 30 Seconds.
Type the password »admin« (23) and start the internet browser. (24) In the address bar you type the IP address of the router. This is 192.168.1.1. (25) Now you will be prompted to enter username and password. (26) The field with the username can be left empty. (27) The Password is »admin«. (28) Click OK.
WRT54GLv1.1(29) Administration: You’ll be taken to WRT54GLv1.1 administration portal. You can see the standard software from Linksys / Cisco.
Click on Firmware Upgrade. One can see that the firmware version is 4.30.7. This is wiil soon be replaced with DD-WRT. (30) Click on the “Administration” tab. (31) Click on Firmware Upgrade.
dd-wrt.v23_mini_generic.bin Select (32) Click “Browse …”. (33) The window “file upload” window opens. (34) One would like the mini version of DD-WRT Version 23 SP1 upload. (35) In this case you need to choose the generic version.
Upgrade to Internet Explorer
(36) This field is now the path to the generic version, with the WRT54GLv1.1 will be flashed immediately. (37) Nearly one would now clicked upgrade. But wait! Stop! Still do not click! You have read on the Internet the information that one better to flash using the Internet Explorer and Firefox. Firefox is even, is not optimal. Better to use the Internet Explorer. Therefore leads to the steps (23 to 36) again again. This time not with Firefox, but with the Internet Explorer. Then you click the Internet Explorer upgrade.
Username is now “root” (39) After you have just clicked on CONTINUE, (40) opens the dialog box where you should enter user name and password to access the IP address 192.168.1.1 can. (41) This is an indication that this is the WRT54GL. (42) The user name must be entered now root “. This is different than before in (26) than in the original Linksys firmware was installed. At the time, specify a user name does not need now is required. (43) The password is still “admin”. (44) Click OK.
DD-WRT v23 SP1 mini (45) in the browser now indicates that DD-WRT v23 SP1 is final (16/05/2006) installed mini. So currently only the mini version is installed. In a further step is flashed on the standard version. Why so complicated? Why first install the mini version first and then the standard version? The reason is that the original Linksys firmware, a firmware upgrade is limited to a maximum of 3 MB. The mini version has less than three megabytes. The standard version has more than three megabytes. If you have installed the mini version, then there is no longer the limit to three megabytes. Then there is only the limit of available flash memory. In this case, the WRT54GLv1.1 is this flash memory (as said) 4 MB. The flash memory is sufficiently large for the standard version.
dd-wrt.v23_sp1_standard.zip (46) Man goes again – as in step (4) – in the DD-WRT downloads section. (47) One recalls that it had decided to step (13) for the mini version. What was the justification for this again? Oh right, the mini version has less than 3 MB. That is why you chose them. (48) Now you may opt for the standard version.
DD-WRT Version 23 SP1 Standard
(48) Once you have decided on the standard version,
(49) A dialog box opens, where you will be asked if you want the standard version of DD-WRT Version 23 SP1 download. (50) Click OK.
dd-wrt.v23_generic.bin (51) It takes a look at the files that you have just downloaded. In the present case, later the generic version is uploaded. It notes that in the file name is no reference to the fact that it is actually not the version 23, but about the Version 23 SP1. This is a bit misleading, but it is in “dd-wrt.v23_generic.bin” despite the inaccurate labeling of Version 23 SP1. (52) On the screenshot indicates that the packet size is approximately 3.41 MB. So the standard version has more than three megabytes. It can be installed immediately, because the router is already the mini version of DD-WRT. The standard version can not be installed when the router is on the original Linksys firmware.
Click “firmware upgrade” – on “Administration”
(53) In Internet Explorer you are in the address bar the IP address of the router 192.168.1.1. (54) “Administration” – click “firmware upgrade”. (55) “Browse …” button.
Press the reset button
(56) Now you do for safety – just as in step (22) – a reset. 30 seconds with a ballpoint pen to press the reset button.
dd-wrt.v23_generic.bin Select
(55) They had only just clicked on “Browse …”. (57) A dialog box for selecting the uploaded file is opened. (58) You want the standard version of DD-WRT Version 23 SP1 upload. (59) For the WRT54GLv1.1 is the file “dd-wrt.v23_generic.bin” the correct version.
Upgrading to dd-wrt.v23_generic.bin
(60) The path to the file “dd-wrt.v23_generic.bin” now specified in this field. (61) It is the warning message notes. A firmware update can take several minutes. Earlier, the fix lasted about 1 minute. Let’s see how long it will take now. (62) Click upgrade.
Progress bar moves
(63) It now takes about 1 minute, in which the progress bar moves back and forth.
Upgrade was successful
(64) The upgrade was successful. The message “upgrade successful. Unit is rebooting now. Please wait a moment …. “You have to wait many seconds now.
Standard version is installed
(65) It is now in the browser. There is “std by the abbreviation” indicates that now the default version installed. Earlier, at (45) was the mini version of the words “mini” was displayed.
Summary: Flashing the WRT54GLv1.1 in two steps: First, flash the mini version. Then flash with the standard version. Flashing should be done with the Internet Explorer.