Publications
Cisco IOS Commands
Privileged Mode
enable – get to privileged mode
disable– get to user mode
enable password <password_here> – sets privileged mode password
enable secret <password_here>– sets encrypted privileged mode password
Setting Passwords
enable secret <password_here> – s et encrypted password for privileged access enable password <password_here>– set password for privileged access (used when there is no enable secret and when using older software) Set password for console access:
(config)#line console 0
(config-line)#login
(config-line)#password <password_here>
Set password for virtual terminal (telnet) access(password must be set to access the router through telnet):
How to SMTP Over an SSH Tunnel?
Spammers would sniff it out fairly quickly, and proceed to hammer it. To get around this, I decided to set up an SSH tunnel from a port on my laptop to port 25 on the mail server. It was a fairly easy task, and well worth it in the long run. The remainder of this article will explain how I set things up.
Set up the Tunnel
The first thing I decided was to establish the tunnel as a non-root user. Since the tunnel was going to exist for solely mail relaying purposes, I created a relay user on both my laptop and the server in question. I also ran ssh-keygen(1) and gave the relay user an empty passphrase. If you’re overly paranoid, you can use a passphrase and then use ssh-agent(1). The way I figure is if someone gets into my laptop, I have more things to worry about than them sending mail through my relay.
How to Locking And Unlocking User Accounts in Linux?
There may come a time when you need to disable a users login to your Linux box… without deleting there account and still allowing them to receive the email. To do this you must login as “root” and at the command prompt type:
<root@techsoftcenter>:/#"passwd -l username"
(Without the quotes of course) This will lock the users account denying them access to login. You may be thinking “well how do I unlock it now?”, well there’s a command for that too =) At the command prompt type:
Email Validation In PHP
Ever have those annoying spammers sign up for something with their email addy and always make up some donkey crap? Well, here is a script that will allow you to block some of that.
We are going to create this script as a function.
//->Email validation script
function validate_email($email) {
if (eregi("([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+.[a-zA-Z0-9._-]+)", $email)) return 1;
else return 0;
}
?>
Now time for an example with the function included.
$email = "[email protected]"
if (validate_email($email)) print "E-mail Address Approved";
else print "Nice Try Spammer";
If there are any problems with the script just let me know.
Filesystems, Directories and Devices NHF
Here are some explanations on file systems, directories, and devices between windows and Linux which people might not understand the terms and not migrate to Linux for some reason.
Coming to Linux from an OS like Windows requires you to learn not only how to operate, but how to understand what is going on in your computer. Many people have a good understanding of the underlying DOS directory structure and how it operates, so switching between OS’s such as mac-os, W8, and W10 are relatively seamless. However, Linux demonstrates a new way of thinking for many users.