Categories
Google chrome

using chrome with socks ssh proxy without any DNS leaks

For funsies, I wanted to try this.

I wanted to use my SOCKS proxy setup, which was very simple:

Then I wanted to use chrome to bypass all proxies that IE has setup AND make sure DNS leaks do not occur.

HOW TO SETUP SOCKS PROXY VIA SSH and PUTTY:
http://www.ocf.berkeley.edu/~xuanluo/sshproxywin.html

Once you have created your SSH socks connection add this flag to the end of your target for your chrome shortcut:

--proxy-server="socks5://127.0.0.1:6060" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE 127.0.0.1"

If your proxy is something other then 127.0.0.1, swap them out. Also swap your port out if that is not the one you used.

socksproxychrome

Once you close your chrome and reopen with the new shortcut you can go here to test:

whatismyip.com

This should show the destination IP and the next URL will show you that you are using your destination hosts DNS servers and NOT your local!

dnsleakstest.com

So cool.

Categories
Google chrome

How to remove the chrome bell in the notification tray icon

Well this is annoying! It used to be removed via: chrome://flags/ and then just disabling “Enable Rich Notifications Mac, Windows”, but now it is: “Notification Center behavior Mac”. You also have to leave the setting to DEFAULT, and not disabled. Then relaunch and it’s gone.

We shall see what it takes on the next go around to disable it. OY Google, please stop. Just make it the same option every time. This is current as of: Version 36.0.1985.143

Categories
Linux

Centos 6 multiple vlans with one eth device

UPDATED for CentOS 7:

CentOS 7 multiple VLANs on one interface

The scenario I had was 1 eth0 device, and my port trunk’d to allow 9 and 10 vlans. I wanted to assign the full /24 to this box, using only eth0 and the trunk port in CentOS 6. This is what I had to do.

in linux NEED eth0 and one VLAN’d CFG:

cd /etc/sysconfig/network-scripts/

ifcfg-eth0.9 the .9 is the vlan

# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE=eth0.9
BOOTPROTO=none
HWADDR=00:1d:xx:xx:xx:xx
ONBOOT=yes
TYPE=Ethernet
IPADDR=173.243.116.2
NETMASK=255.255.255.0
VLAN=yes

ifcfg-eth0.10

# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE=eth0.10
BOOTPROTO=none
HWADDR=00:1d:xx:xx:xx:xx
ONBOOT=yes
TYPE=Ethernet
IPADDR=173.243.117.2
NETMASK=255.255.255.0
VLAN=yes

ifcfg-eth0
# Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:1d:xx:xx:xx:xx
ONBOOT=yes
TYPE=Ethernet

ifcfg-eth0.9-range0
IPADDR_START=173.243.116.3
IPADDR_END=173.243.116.254
NETMASK=255.255.255.0
CLONENUM_START=3

ifcfg-eth0.11-range0
IPADDR_START=199.96.80.3
IPADDR_END=199.96.80.254
NETMASK=255.255.255.0
CLONENUM_START=257

******************************************************************************************

CENTOS 6 REQUIRES NO GATEWAY in ifcfg-eth0.xx so remove it

CENTOS 6 REQUIRES ROUTES ADDED:

You can do this to test, as once the server is rebooted, or network restarted these rules drop:
ip route add default via 192.119.164.1 dev eth0.8 table 1
ip route add default via 192.119.165.1 dev eth0.9 table 2
ip rule add from 192.119.164.2 tab 1 priority 500
ip rule add from 192.119.165.2 tab 2 priority 501
ip rule add from 192.119.164.0/24 table 1
ip rule add from 192.119.165.0/24 table 2

To make it permanent:
cd /etc/sysconfig/network-scripts/

echo ‘default via 192.119.169.1 dev eth0.3 table 1’ > route-eth0.3
echo ‘default via 192.119.174.1 dev eth0.6 table 2’ > route-eth0.6
echo ‘from 192.119.169.2 tab 1 priority 500’ > rule-eth0.3
echo ‘from 192.119.174.2 tab 2 priority 501’ > rule-eth0.6
echo ‘from 192.119.169.0/24 table 1’ > rule-eth0.3
echo ‘from 192.119.174.0/24 table 2’ > rule-eth0.6

******************************************************************************************

Categories
Linux

history command with timestamp linux

I always find it easier when my history has a time stamp, you can coorolate a lot of things, like last, start/stops of services, who done it, etc.

export HISTTIMEFORMAT=”%F %T ”

This will work for the session, but if you want it saved for every log in add to respective bash_profile:
~/.bash_profile or /root/.bash_profile

Categories
Linux

Firewall Status: Enabled but Stopped in CSF with cPanel

I kept getting: Firewall Status: Enabled but Stopped in my CSF in cPanel. I am currently running WHM 11.40.1 (build 11) and csf v7.03.

I tried just clicking start, no luck it would just flip back a few minutes later. So I ended up dropping to shell and running

service csf stop
iptables –flush
service csf start

that seemed to work, there must have been a hung iptables rule, or a bad rule that caused CSF to flip to disabled.

Categories
linux Operating System Deployment

error when copying or overwriting the same directory name linux

my directory structure in linux – centos:

/home/html/prod/wordpress/update/
/home/html/prod/wordpress/

/wordpress/ is my wordpress install, and /update/ is my unziped download files and directories.

The errors I kept getting when trying to move or copy the entire directory while sitting in /home/html/prod/wordpress/update/ was:

mv: cannot move `wp-admin’ to a subdirectory of itself, `../wp-admin’
mv: cannot move `wp-content’ to a subdirectory of itself, `../wp-content’

cp: omitting directory `wp-admin’
cp: omitting directory `wp-content’

what I ended up doing was staying in the same directory ( /home/html/prod/wordpress/update ) and running:

cp -fR * ../

f = force
R = recursive

all went well, replaced the entire directory like I wanted and I just removed the /update directory and done.

Categories
Linux

how to disable RHN in linux – red hat or centos

What I did to disable it was go to: /etc/sysconfig/rhn

and delete all of the files in it. If you want to re-enabled it after, you can just copy the files back, so you may want to copy them to a location you want to keep them at.

Categories
Linux

How to get external ip via linux command line

wget -O - -q icanhazip.com

you will get a very easy looking readout

example:

root@madhost419 [~]# wget -O - -q icanhazip.com
74.122.196.130
root@madhost419 [~]#

or via curl:

curl http://www.cPanel.net/showip.cgi

Categories
Linux

removing the limit of 100 rows in squirrel

Using the squirrel app: http://www.squirrelsql.org/ I had issues with only seeing 100 rows in a table. I fixed this by going to File -> New Sessions Properties -> Object Tree -> Contents -> limit rows. The default is 100, but you can uncheck it and you should be good.

If not, you can also do the same under New Sessions Properties -> SQL -> SQL Results – limit rows. Then uncheck it and hit OK.

That worked for me!

Categories
Operating Systems Windows 8

alt f4 on surface pro with type keyboard 2

I couldn’t get alt f4 working on any of my apps on my new microsoft surface pro with type keyboard 2. It ended up being that my function lock was set! I had to unlock that via: function + caps lock (Thanks rsutoratosu on Anandtech). And now ALT F4 works, time to go kill some apps!