Tagarchief: Firefox

How to prevent https://r.twimg.com/jot from opening

Recently, I noticed that I had a tab opening in Firefox with the URL https://r.twimg.com/jot in a new tab. Apparently, when visiting RSS feeds in Thunderbird, this tracker is opened in another tab, which is quite annoying.

I've read a lot of solutions to this issue, most of them being changes in the settings of either Thunderbird or Firefox. Probably the best solution was to deny ||r.twimg.com/jot through ad block plus.

My solution was a quick hack: I fixed it by adding a patch to /usr/bin/firefox
if [ "`echo $@|grep r.twimg.com/jot`" != "" ]; then
echo jot stopped | logger
exit 0
fi
if [ "`echo $@|grep twitter.com/i/jot`" != "" ]; then
echo jot stopped | logger
exit 0
fi

© GeekLabInfo How to prevent https://r.twimg.com/jot from opening is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Firefox configuration settings

Useful Firefox settings. Change them in about:config

security.dialog_enable_delay The delay in ms before you can click the "install plugin" button.
dom.max_script_run_time Maximum script runtime in seconds before Firefox asks if you want to terminate the script.
© GeekLabInfo Firefox configuration settings is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Un-hide the “http://” in Firefox 7

Firefox 7 has this annoying feature to hide the http:// in front of an address and to hide a single trailing forward slash. What's most annoying, is that when copying the url to a clipboard, it prepends the http:// again. So when I enter a website, then copy the domainname to a console in order to ping/trace/whois it, I have to remove the http:// manually.

To restore the prefix, enter the url about:config. Search for browser.urlbar.trimURLs and toggle it to false. That's all folks.

© GeekLabInfo Un-hide the "http://" in Firefox 7 is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Reconfigure nspluginwrapper

Yay, I just upgraded my nspluginwrapper and everything broke. Again. Couldn't use youtube or any of my other favorite sites anymore.

Running firefox from the console gave me some feedback:

*** NSPlugin Viewer  *** ERROR: NP_Initialize() get args: Message argument mismatch
*** NSPlugin Viewer  *** ERROR: rpc_end_sync called when not in sync!
*** NSPlugin Wrapper *** ERROR: NP_Initialize() wait for reply: Connection closed
NOTE: child process received `Goodbye', closing down

When I google'd around a bit, I found some commands for older/different versions of nspluginwrapper. Finally, I tried the parameters of the old binary on the new binary:
/usr/lib64/nspluginwrapper/npconfig -a -v -i
and got the output:

Auto-install plugins from /usr/lib/mozilla/plugins
Looking for plugins in /usr/lib/mozilla/plugins
Install plugin /usr/lib/mozilla/plugins/libflashplayer.so
  into /home/username/.mozilla/plugins/npwrapper.libflashplayer.so
Auto-install plugins from /usr/lib64/mozilla/plugins
Looking for plugins in /usr/lib64/mozilla/plugins
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/libtotem-gmp-plugin.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/libtotem-gmp-plugin.so
  into /home/username/.mozilla/plugins/npwrapper.libtotem-gmp-plugin.so
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/skypebuttons.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/skypebuttons.so
  into /home/username/.mozilla/plugins/npwrapper.skypebuttons.so
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/libtotem-cone-plugin.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/libtotem-cone-plugin.so
  into /home/username/.mozilla/plugins/npwrapper.libtotem-cone-plugin.so
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/librhythmbox-itms-detection-plugin.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/librhythmbox-itms-detection-plugin.so
  into /home/username/.mozilla/plugins/npwrapper.librhythmbox-itms-detection-plugin.so
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/libtotem-narrowspace-plugin.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/libtotem-narrowspace-plugin.so
  into /home/username/.mozilla/plugins/npwrapper.libtotem-narrowspace-plugin.so
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/libtotem-mully-plugin.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/libtotem-mully-plugin.so
  into /home/username/.mozilla/plugins/npwrapper.libtotem-mully-plugin.so
*** NSPlugin Viewer  *** ERROR: /usr/lib64/mozilla/plugins/libjavaplugin.so: wrong ELF class: ELFCLASS64
Install plugin /usr/lib64/mozilla/plugins/libjavaplugin.so
  into /home/username/.mozilla/plugins/npwrapper.libjavaplugin.so
Auto-install plugins from /home/username/.mozilla/plugins
Looking for plugins in /home/username/.mozilla/plugins
Install plugin /home/username/.mozilla/plugins/libflashplayer.so
  into /home/username/.mozilla/plugins/npwrapper.libflashplayer.so
*** NSPlugin Viewer  *** ERROR: /home/username/.mozilla/plugins/libnpgoogletalk64.so: wrong ELF class: ELFCLASS64
Install plugin /home/username/.mozilla/plugins/libnpgoogletalk64.so
  into /home/username/.mozilla/plugins/npwrapper.libnpgoogletalk64.so
*** NSPlugin Viewer  *** ERROR: /home/username/.mozilla/plugins/libnpgtpo3dautoplugin.so: wrong ELF class: ELFCLASS64
Install plugin /home/username/.mozilla/plugins/libnpgtpo3dautoplugin.so
  into /home/username/.mozilla/plugins/npwrapper.libnpgtpo3dautoplugin.so

After this, my Firefox was running as usual.

© GeekLabInfo Reconfigure nspluginwrapper is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Transparent proxy with iptables and squid

Today, my dear wife asked me to help her with her facebook addiction. She wondered if I could block facebook, gmail, some news sites and more during her work hours. Sure, I can. And since she's running Linux as well, I could even do it on her own computer.

Step 1: Install squid

Squid is a FLOSS proxy server that runs on Linux and several other sytems. It's capable of filtering and behaving transparently. Just what we need.

yum -y install squid

Step 2: Configure squid

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

# Here I define the times and what file contains the rules
acl playtime1 time SMTWHFA 8:30-9:30
acl playtime22 time SMTWHFA 16:00-17:00
acl addiction url_regex -i "/etc/squid/addiction"

# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# We strongly recommend the following be uncommented to protect innocent
# web applications running on the proxy server who think the only
# one who can access services on "localhost" is a local user
#http_access deny to_localhost

#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#

# The next few lines actually do the work
http_access allow playtime1 addiction
http_access allow playtime2 addiction
http_access deny addiction
# If this ACL is triggered, show the user the WORKONLY error message.
deny_info WORKONLY addiction

# Example rule allowing access from your local networks.
# Adapt localnet in the ACL section to list your (internal) IP networks
# from where browsing should be allowed
http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy
http_access deny all

# Squid normally listens to port 3128
# I added the word "transparent", so squid behaves a little different:
# it makes itself transparent. NOTE TO SELF: This is the line you're
looking for. Used to be httpd_accel_uses_host_header in squid 2

http_port 3128 transparent

# We recommend you to use at least the following line.
hierarchy_stoplist cgi-bin ?

# Uncomment and adjust the following to add a disk cache directory.
#cache_dir ufs /var/spool/squid 100 16 256

# Leave coredumps in the first cache dir
coredump_dir /var/spool/squid

# Add any of your own refresh_pattern entries above these.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320

# Don't show squid to the outside world
forwarded_for delete

# I don't need to log what she's doing
access_log none
# Nor do i need icap logs
icap_log none
# And i don't want to know what is stored in cache
cache_store_log none
# To not break web apps, I don't want caching either
cache deny all

Step 3: Define blocked sites

Type a list of blocked websites in /etc/squid/addiction. You can use complete urls, domains or even just words. Ie. "facebook" blocks http://www.facebook.com, but also http://wikipedia.org/wiki/facebook

Step 4: Leave a message

In the configuration, I put: deny_info WORKONLY addiction. This means that I can leave the user a message in /usr/share/squid/errors/templates/WORKONLY and /usr/share/squid/errors/en/WORKONLY. Since it's my wife's PC, I decided to leave her a sweet message :-D

Step 5: Route network traffic

I could configure her Firefox to use the proxy. But then she'd use Google Chrome or Konqueror to surf the web. And she could turn the proxy off. So I need to catch all http-traffic that did not pass squid. I used iptables:

#Allow user 'root' to surf the web, for yum update etc.
iptables -t nat -A OUTPUT -m tcp -p tcp --dport 80 -m owner --uid-owner root -j RETURN
# Allow user 'squid' to pass on http requests
iptables -t nat -A OUTPUT -m tcp -p tcp --dport 80 -m owner --uid-owner squid -j RETURN
# Redirect all other traffic to the proxy.
iptables -t nat -A OUTPUT -m tcp -p tcp --dport 80 -j REDIRECT --to-ports 3128
© GeekLabInfo Transparent proxy with iptables and squid is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4,25 out of 5)
Loading...

Firefox 3.6 update broke VMWare WebAccess

I already covered how to run VMWare Remote Console outside the browser. But the latest Firefox update broke more. It appears that Firefox is no longer connecting to SSL2 websites anymore.

The problem accessing the console is that FF 3.6 now has SSL2 disabled by default. Open about:config and change security.enable_ssl2 from false to true.

But that won't help with the console plugin, which although it installs, won't work from the "Console" tab. The workaround here is to generate a shortcut on your desktop and launch your session from there. -- mozilla.com

© GeekLabInfo Firefox 3.6 update broke VMWare WebAccess is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Running VMWare Remote Console outside the browser

Firefox 3.6 update broke my VMWare WebAccess.

Since I updated to Firefox 3.6, I have not been able to run the vmware remote console plugin anymore. Running Linux, this is a pretty important program, as there is no vSphere client for Linux.

How to run VMWare Console from the bash shell?

cd /tmp
IP=the.esx.srv.ip  <em># < fill in esx server ip address here</em>
wget --no-check-certificate https://$IP/ui/plugin/vmware-vmrc-linux-x86.xpi
mv vmware-vmrc-linux-x86.xpi vmware-vmrc-linux-x86.zip
cd ~
mkdir -p bin/vmwareconsole <em># make directory bin in your own homedir</em>
cd bin/vmwareconsole
unzip /tmp/vmware-vmrc-linux-x86.zip
cd ~/bin
ln -s vmwareconsole/plugins/vmware-vmrc .   <em># make a symlink for easy access</em>
vmware-vmrc   <em># run the console</em>

© GeekLabInfo Running VMWare Remote Console outside the browser is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (11 votes, average: 5,00 out of 5)
Loading...

Enable web access to VMWare ESX 4

The first time I tried to access the VMWare ESX 4 web client, I got this 503 Service unavailable error, which made me think I broke something. But on the second install, I got the exact same message.

While this is not important for most Windows users, as a Linux user I need this entry as there is no vSphere client for Linux.

In a default installation VMWare ESX 4.0 appears not to be running all required daemons to connect to the web client.

So what to do?

  • Log on to the server over SSH (console access)
  • Type service vmware-webAccess status to check the current status of the webAccess daemon
  • Type service vmware-webAccess start to start the webAccess daemon
  • run /sbin/chkconfig –level 345 vmware-webAccess on to make webAccess start automatically on booting the ESX server
  • Make sure to firewall the ESX management to prevent abuse.
  • © GeekLabInfo Enable web access to VMWare ESX 4 is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
    1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3,00 out of 5)
    Loading...