Android Apps

Updated list available at https://techpain.com/android-apps-march2017/

My favorite System and Network related Android apps. At the time of this post they are all free and none of them require a rooted device.

  • Mocha VNC Lite: Mocha VNC provides access to VNC Servers. Windows and Mac OS X compatible.
  • uNagi: A Nagios and Incinga client. My favorite features: Allows connections over https, acknowledge notifications, view service and host problems, no additional Nagios plugins required.
  • 2Xclient: An easy to use RDP client.
  • OpenVPN Connect: VPN client for the OpenVPN Access Server, Private Tunnel and OpenVPN Community.
  • Lookout Security & Antivirus: Protection against malware and viruses.
  • FoxFi: Wifi tethering without a rooted device.
  • Fing – Network Tools: Network discover, ping, traceroute, DNS lookup, port scan, and more.
  • Glympse: Not necessarily an app for just tech types, but great for letting people know where you are and when you’ll get to your destination.
  • Quickoffice: View and edit Word, Excel, and PowerPoint files, view PDF’s.
  • Wifi Analyzer: Show information about wifi networks; Channels, stength, and more.
  • WordPress: Easily, write, edit, and publish WordPress posts on WordPress.com AND self-hosted WordPress sites.
  • OpenSignal: Locate better cellular coverage or wi-fi, report dropped calls, and much more.
  • Speedtest.net: Ookla speedtest shows upload and download speeds, as well as ping times.
  • Name.com for Android: Name.com is one of the best registrars out there. This app allows you to manage your Name.com registered domains, including renewal and DNS management. Check domain name availability, register new domain names, and search for domain names based on your geographical location.
  • Servers Ultimate: Turn your Android phone in to a multipurpose server.
  • AndFTP: FTP client that manages multiple FTP connections
  • AirDroid: Connect to your Android phone from your computer to manages SMS and more – with no wires.
Share

MSTSC/RDP: Bypassing “The terminal server has exceeded the maximum number of allowed connections”

The quick and dirty MSTSC command

mstsc /v:192.168.1.100 /admin

Getting more information

Look at current remote sessions:
query session /server:servername

Now disconnect the session of your choice by specifying the session ID in the following command:
reset session [ID] /server:servername

RDP/MSTSC

Share

Changing the Remote Desktop (RDP) Listening Port Number

Quick regedit to change your RDP port in Windows

Changing the port number for RDP (remote desktop protocol) just involves a simple regedit:

RDP - Remote Desktop Protocol

  1. Start > Search > Regedit
  2. Browse to HKEY_LOCAL_MACHINE > System > CurrentControlSet > Control > TerminalServer > WinStations > RDP-Tcp
  3. Locate the PortNumber subkey, change it to ‘decimal’ and change the Port number
  4. Adjust firewalls appropriately
  5. Reboot

Please keep in mind that this is not a security solution! Whenever possible, don’t leave your RDP port public facing!

RDP - Remote Desktop Protocol - techpain.com

Share

Log Off Users from Terminal Server – .bat File

Log off all users, but with specific exceptions

RDP - Remote Desktop Protocol

I came across a situation where we needed to automatically disconnect all users from a terminal server, except for one specific user. The following script (thanks Ferdinand!) can be run as a batch file to accomplish just that; it will log off all terminal server users except for ‘userx’. It gives each user a 5 minute and 1 minute warning, then runs a ‘query session’ to see what sessions show up and writes them to a file call ‘sessions.txt’. Next it searches the session.txt file for “userx” and writes the rest of the sessions to “killts.txt”, logs off those sessions/users, and deletes the .txt files that it created. It goes through the process twice to get active AND disconnected sessions.


@ECHO OFF
msg * You will be logged off in 5 minutes.
choice /T:240 /D N /N > Nul
msg * You will be disconnected in 1 minute! Please log off now!
choice /T:60 /D N /N > Nul
query session >C:SchedTaskssessions.txt
find /v "userx" C:SchedTaskssessions.txt > C:SchedTaskskillts.txt
for /f "skip=5 tokens=3," %%i in (C:SchedTaskskillts.txt) DO logoff %%i
query session >C:SchedTaskssessions.txt
find /v "userx" C:SchedTaskssessions.txt > C:SchedTaskskillts.txt
for /f "skip=5 tokens=2," %%i in (C:SchedTaskskillts.txt) DO reset session %%i
del C:SchedTaskssessions.txt
del C:SchedTaskskillts.txt
EXIT

Here are some other related Windows TS/RDS commands (from thelazyadmin.com):

Query TermServer – Lists all terminal servers in the current domain.
QUERY TERMSERVER [/domain:domain] [/address][/continue]
* /domain:domain – specifies the domain (current logged on domain is default)
* /address – lists the IP address of the terminal server
* /continue – removes the pause between output screens

Query Session – Lists all current sessions running on a terminal server.
QUERY SESSION [sessionname | username | sessionid][/server:servername] [/mode] [/flow] [/connect] [/counter]
* sessionname is the name of the session that you want to query
* username is the name of the user you want to query
* sessionid is the ID of the session you want to query
* /server:servername is the name of the server you are querying
* /mode outputs the current line settings
* /flow outputs the current flow control settings /connect outputs the current connection settings
* /counter outputs the counter information for the server

Query User or Quser – Lists all current users on a terminal server
QUERY USER [username | sessionname | sessionid] [/server:servername]
* sessionname is the name of a specific session that you want to query
* username is the name of the specific user you want to query
* sessionid is the ID of the specific session you want to query
* /server:servername is the name of the server you are querying

Query Process – Lists all processes running on the terminal server.
QUERY PROCESS [ x | processid | username | sessionname | /id:nn | programname] [/server:servername] [/system]
* x lists information on all processes (note – replace x with an asterisk)
* processid lists information about only the specific process ID
* username lists processes running under the context of a specific user
* sessionname lists processes running under the context of a specific session
* /ID:nn lists processes running in the session with the specified session ID number
* programname lists all processes started by the specified executable
* /server:servername is the name of the server you are querying—the default is the server you are logged on to
* /system lists processes running under the system context

TSShutdn – Will shutdown/reboot the terminal server after a specified delay.
TSSHUTDN [wait_time] [/server:servername] [/reboot] [/powerdown] [/delay:logoffdelay] [/v]
* wait_time is the number of seconds to wait after notifying the users that the terminal server is about to shut down before forcibly logging them off (the default is 30 seconds)
* /server:servername is the name of the server to reboot/shutdown (the default is the server to which you are connected)
* /reboot reboots the server
* /powerdown powers down the server after Windows has shutdown; the servers BIOS must support this command
* /delay:logoffdelay the number of seconds to wait after logging out all users before shutting down the system (the default is 30 seconds)
* /v displays verbose information about actions being performed

Logoff – Will logoff the specified user off the terminal server and close the session. Caution, if you don’t specify a user it will log you off!
LOGOFF [sessionid | sessionname] [/server:servername] [/v]
* sessionid is the ID of the session you want to logoff
* sessionname is the name of the session you want to logoff
* /server:servername specifies the name of server on which the session you want to logoff is running
* /v displays verbose information about actions being performed

Reset Session – Will kill the specified users session without warning which can be useful when a users session is stuck. Caution, if you don’t specify a user it will kill your session!
RESET SESSION [sessionname | sessionid] [/server:servername] [/v]
* sessionid is the ID of the session you want to logoff
* sessionname is the name of the session you want to logoff
* /server:servername specifies the name of server on which the session you want to logoff is running
* /v displays verbose information about actions being performed

MSG – Will popup a message on the specified user(s) terminal server session.
MSG [username | sessionname | sessionid | @filename | x ][/server:servername] [/time:seconds] [/v] [/w] message
* username is the name of the user to whom you are sending the message
* sessionname is the session name to which you want to send the message
* sessionid is the ID number of the session to which you want to send the message
* @filename is the name of a text file containing usernames, sessionnames, or session IDs to which you want to send the message
* x sends the message to all users on the current or specified server (note – replace x with an asterisk)
* /server:servername specifies the server where recipients of the message are connected
* /time:seconds the number of seconds to display the message before the popup closes itself
* /v displays information about the message as it is sent
* /w causes the popup window to wait for the user to click OK before closing message is the text of the message to send

Shadow – Will allow you to shadow or take control of a users session.
SHADOW [sessionname | sessionid] [/server:servername] [/v]
* sessionid is the ID of the session you want to logoff
* sessionname is the name of the session you want to logoff
* /server:servername specifies the name of server on which the session you want to logoff is running
* /v displays verbose information about actions being performed

*** NOTE: Windows Server 2008 changed the name Terminal Services (TS) to Remote Desktop Services (RDS), but the above commands are the same. ***

Share

LogMeIn – Remote Desktop Control

From the LogMeIn.com site:
“LogMeIn Free gives you remote control of your PC or Mac from any other computer with an Internet connection. Simply install LogMeIn on the computer you want to access (it takes about 2 minutes), log into your account from another computer and click the computer you want to control. You’ll see its desktop and be able to use all the applications on your remote computer as if you were sitting in front of it – even if you’re across town, across the country, or across the world.”

There is added functionality (file transfer, remote sound, printing, etc.) available in the Pro Edition, and there is a comparison chart available here. The Free Edition is not too shabby, the only problem I have with it is that there isn’t Linux support.

Share

KoH Virtual Servers – KoHvs.com

KoH Virtual Servers is offering really great virtual server access.

Every virtual server includes:

  • Unlimited monthly bandwidth
  • Full root access
  • Dedicated system resources, never shared or oversold
  • Choose and load your own operating system
  • Web-based control center
  • Secure, graphical maintenance console

They can be activated INSTANTLY, right from the KoHvs site.

Once you’ve activated your virtual server, simply log in to the site and click on ‘Control Center’. This will display the basic information regarding your server, along with graphs for CPU usage and network activity. You can reboot your server here (or install a different OS), and you’re only one click away from controlling your server remotely.

KoHvs Control Panel - Kohntrol

From the Control Center just click on ‘Launch Maintenance Console’, and you’re right in front of your server!
KoHntrol - My Virtual Server running CentOS 5

Share

Share

Remote Administration and Kaspersky Obstacles

Kaspersky Anti-Virus (KAV) has been a bit of a hassle. Here are some of the issues I’ve run into with VNC/RDP remote management over multiple sites on different subnets.

KAV detects the LAN it is on and adds it to its “trusted networks”, but you’ll need to add additional trusted networks if they are on a different subnet (Settings>Anti-Hacker>Settings>Zones>Add). If you don’t, you won’t be able to VNC, rdp, or even ping the box from a different subnet.

KAV - ICMP settings The reason you can’t ping is probably because you need to set “Other ICMP types” to allow instead of block (Settings>Anti-Hacker>Rules for Packet Filtering>Settings).
KAV - Trusted Applications VNC will probably need to be added as a trusted application, so that KAV doesn’t block it (Settings>Trusted Zone>Trusted Application>Add).

You won’t be able to modify the KAV client settings by VNCing to the machine. You can open the KAV client, but as soon as you do you wont be able to even mouse-over the window (pretty smart security feature). This goes for the ‘Allow/Block’ pop-ups as well. You’ll have to use RDP to be able to do this.

Because of these snags, it’s a good idea to set up RDP access on top of VNC. Imaging machines helps as well, but make sure all the settings persist through the imaging process.

Share

Share

Cisco ‘reload’ command

Thanks to oreillynet.com’s Top Ten Cisco IOS Tips:

When you are doing something tricky, you can use the following feature of the reload command, which causes the router to reboot in a certain number of minutes. For example, let’s tell the router to reboot in three minutes.


MyRouter#reload in 3
Reload scheduled in 3 minutes
Proceed with reload? [confirm]y

Now, we have three minutes to do what we need to do. Let’s say we are applying an access-list to serial0.


MyRouter#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
MyRouter(config)#interface serial0
MyRouter(config-if)#ip access-group 110 in
MyRouter(config-if)#^Z
MyRouter#

We made the change and everything still works. (Well, at least our connection wasn’t dropped.) Now all we have to do cancel the impending reload with the following command:


MyRouter#reload cancel

Or, if our access-list update did destroy our connection to the router, all we need to do is wait three minutes (plus the router’s reload time) before the router is back online. After the reload, the router uses the original saved configuration before our access-list change.

Share

Share