Adjust Windows DNS settings from command line

If you ever wanted to change the DNS settings on Windows 7/8 here’s how you do it.

Open a command prompt with Administrator privileges, and type the following:

netsh interface ip set dns name="Wi-Fi" static 192.168.1.2

Secondary DNS:

netsh interface ip add dns name="Wi-Fi" 192.168.1.1index=2

If you want to change to use DHCP Server provided DNS do this:

netsh interface ip set dnsservers name="Wi-Fi" source=dhcp

Secure Erase SSD in Linux

Original Article: https://wiki.archlinux.org/index.php/SSD_memory_cell_clearing

Step 1 – Make sure the drive security is not frozen

Issue the following command:

# hdparm -I /dev/sdX

Step 2 – Enable security by setting a user password

Note: When the user password is set the drive will be locked after next power cycle denying normal access until unlocked with the correct password.

Any password will do, as this should only be temporary. After the secure erase the password will be set back to NULL. In this example, the password is “PasSWorD” as shown:

# hdparm --user-master u --security-set-pass PasSWorD /dev/sdX
security_password="PasSWorD"
/dev/sdX:
Issuing SECURITY_SET_PASS command, password="PasSWorD", user=user, mode=high

As a sanity check, issue the following command

# hdparm -I /dev/sdX

The command output should display “enabled”:

Security: 
        Master password revision code = 65534
                supported
                enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        Security level high
        2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.

Step 3 – Issue the ATA Secure Erase command

Warning: Triple check that the correct drive designation is used. There is no turning back once the command is confirmed. You have been warned.
# hdparm --user-master u --security-erase PasSWorD /dev/sdX

Wait until the command completes. This example output shows it took about 40 seconds for an Intel X25-M 80GB SSD.

security_password="PasSWorD"
/dev/sdX:
Issuing SECURITY_ERASE command, password="PasSWorD", user=user
0.000u 0.000s 0:39.71 0.0%      0+0k 0+0io 0pf+0w

The drive is now erased. After a successful erasure the drive security should automatically be set to disabled (thus no longer requiring a password for access). Verify this by running the following command:

# hdparm -I /dev/sdX

The command output should display “not enabled”:

Security: 
        Master password revision code = 65534
                supported
        not     enabled
        not     locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        2min for SECURITY ERASE UNIT. 2min for ENHANCED SECURITY ERASE UNIT.

How to Setup Webmin 1.620 using YUM repository on CentOS 6.4

http://www.howtolinux247.info/2013/06/how-to-setup-webmin-1620-using-yum.html

 

This post will brief you on how to setup Webmin 1.620 using yum repository in CentOS 6.4 virtual private server (VPS). Webmin is an open source system administration and system configuration tool which provide you web-based interface to manage, administer and configure your CentOS VPS or dedicated server through web browser. It’s provide graphical interface remote administration instead of manually edit the configuration using command line from putty or console. 1. Enabling Yum repository for Webmin. Create the /etc/yum.repos.d/webmin.repo file containing :

[root@centos64 ~]# vi /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=http://download.webmin.com/download/yum
mirrorlist=http://download.webmin.com/download/yum/mirrorlist
enabled=1

2. Fetch and install my GPG key :

[root@centos64 ~]# wget http://www.webmin.com/jcameron-key.asc
[root@centos64 ~]# rpm --import jcameron-key.asc

3. Run “yum install” command to install all required dependencies :

[root@centos64 ~]# yum install webmin -y

Example :

[root@centos64 ~]# yum install webmin -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * Webmin: download.webmin.com
 * base: mirrors.hostemo.com
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package webmin.noarch 0:1.620-1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                   Version                 Repository              Size
====================================================================================================
Installing:
 webmin                 noarch                 1.620-1                 Webmin                  21 M

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 21 M
Installed size: 21 M
Downloading Packages:
webmin-1.620-1.noarch.rpm                                                    |  21 MB     04:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : webmin-1.620-1.noarch                                                            1/1
Operating system is CentOS Linux
Webmin install complete. You can now login to http://centos64.ehowstuff.local:10000/
as root with your root password.
  Verifying  : webmin-1.620-1.noarch                                                            1/1

Installed:
  webmin.noarch 0:1.620-1

Complete!

4. By default Webmin runs on port 10000, therefore port 10000 need to be open in order to allow you to access web base interface remotely.

[root@centos64 ~]# vi /etc/sysconfig/iptables

Add the following rule to existing iptables firewall :

-A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -j ACCEPT

Restart IPtables :

[root@centos64 ~]# service iptables restart

5. Access and login to Webmin using URL http://serveripaddress:10000/

U.S. Robotics v.92 external init string

U.S. Robotics

For instructions on how to physically connect it and for general configuration instructions, see the documentation that came with the modem.

Set the DIP switches on the modem to match the settings listed in the table below.

U.S. Robotics External Modem Switch Settings Switch Setting Function 

  1. OFF (Up) DTR (Data Terminal Ready) override
  2. OFF (Up) Result codes
  3. ON (Down) Result codes
  4. OFF (Up) Keyboard command echo
  5. ON (Down) Auto answer
  6. OFF (Up) CD (Carrier Detect) override
  7. ON (Down) Power-on and ATZ reset factory defaults
  8. ON (Down) AT command recognition

 

Initialization Strings:

When using a US Robotics modem, I have found the best initialization strings are:

Using Caller ID AT&F1&N6S0=2#CID=1
Without Caller ID AT&F1&N6S0=1
Error Correction Disabled* AT&F1&M0&K0&N6S0=1
If you need to connect to older systems using TN1648 boards (2400 baud) you need to turn off error control (ARQ) by adding &M0 to the string like: AT&F1&N6&M0&K0S0=1