Making Traceroutes Work with a Firewall (Windows)
Hi!
Even though I've had software firewalls in action for years now, I haven't really come across too many instances where I'd need traceroutes. The few times I did, however, I noticed that I only got output like the following:
>tracert example.com Tracing route to example.com [123.123.123.123] over a maximum of 30 hops: 1 * * * Request timed out. 2 * * * Request timed out. 3 * * * Request timed out. 4 * * * Request timed out. 5 * * * Request timed out. 6 * * * Request timed out. 7 * * * Request timed out. 8 * * * Request timed out. 9 * * * Request timed out. 10 * * * Request timed out. 11 50 ms 50 ms 50 ms example.com [123.123.123.123] Trace complete.
The number of hops would of course vary for the specific host / IP address.
Today I had to use traceroute in order to analyze a couple of networking problems. That was the incentive I needed to look up why it didn't work.
The fact that not even my router was showing up was a big indicator that something was wrong with my local firewall settings.
After searching the web for a couple of minutes, I found out what I was looking for at this page: http://www.phildev.net/ipf/IPFques.html#ques34
Traceroute is using ICMP packets (plus UDP on Linux systems, but that's outside the scope of this blog entry. You can read more about it on the page I linked above). But even for an outgoing traceroute you need to accept incoming ICMP packets.
Which ones? These:
- ICMP TTL Expired (Type 11, Code 0)
- ICMP Port Unreachable (Type 3, Code 3)
Once you've enabled these types of packets for incoming traffic in your firewall(s), you'll see that your traceroute will now function as it should.
If your firewall does not allow you to configure accepting specific types of ICMP packets, try allowing incoming ICMP packets altogether (if that's not too much of a compromise for you).
Anyway, long-ish story short: It's working now
Thanks to the webmaster of the page I linked above! And thanks to you for reading.
Using Different Color Schemes with Vim
Hey!
If you have been using the Linux console text editor vim (or: Vi IMproved), you have probably noticed already that at times - especially in files with a large amount of comments - the default color scheme on a black background is less than ideal. Dark blue on black is pretty hard to read and can strain the eyes a lot.
So today I went out to see if somebody had come up with a solution for this particular problem. I saw people who changed console colors by exporting and overwriting certain system variables, and others who edited the default color scheme.
The simplest solution I have found to this problem is just switching the color scheme. You can do that by typing the following in the already open vim session:
:colorscheme desert
where desert is just an example for the scheme of choice. Desert - for me - has just the right color for comments: aquamarine / light blue.
If you are satisfied with the scheme and would like it to be applied each time you launch vim, you can just edit /etc/vim/vimrc (or in my case with CentOS: /etc/vimrc) and add the following line:
colorscheme desert
with desert again, of course, being the chosen color scheme. This would apply this setting automatically for each vim instance that is launched system-wide. If you do not have access to the system-wide preferences or prefer just using it for your own user account, edit the ~/.vimrc instead.
The blog entry I got this tip from (Asher's space) has further instructions on how to edit existing color schemes and even a link to a blog post that explains how to edit the dark blue color for directories in ls listings with color, but I did not feel the need to go that far. If you are interested in that topic I can only encourage you to visit the original post.
Thanks for reading!
Update (2012-01-04):
Okay, looks like pingback isn't working, so here's a direct link to the original blog post:
vi code highlighting: change the default comments color from dark blue to light blue (https://asher2003.wordpress.com/)
New Old Blog URL
Hello and a Happy New Year 2012!
Yesterday evening and early today I decided to implement something that has been flying around in my head for quite some while. I enabled SSL for my website - including this blog! - and at the same time moved the blog back to its original URL: http://blog.plee.me/
Now, as some of you might know, that subdomain URL has always continued to work even though I switched the URL to the subdirectory one for a while. However, instead of invalidating one or the other, both will still work. If you visit a link pointing to http://www.plee.me/blog/... you will be redirected to the new subdomain one.
So, with SSL being enabled as well, you can also reach this blog via https://blog.plee.me/, which I would strongly advise you to use over the unencrypted one. It's quite unlikely that I will post highly sensitive content on here to justify SSL encryption, but hey, it's fancy, and who doesn't like fancy stuff, right?
In order to not get any warning due to untrusted certificates, however, I recommend (not only for my site's sake but for a number of other privately or non-commercially run websites throughout the whole web) you visit http://www.cacert.org/ and get the root certificates for your browser so that CAcert will be trusted as a Certificate Authority.
Alright, that's it for now. I think I will have some relevant stuff to write about in 2012, so stay tuned.
Don't hold your breath though
Oh, and in case you haven't noticed, I have actually been active on Twitter again for the last half year or so, and I'm intending on keeping that trend. So swing by there if you like
The link/info is on my main website.
Thanks for reading and sorry for any inconvenience.
Detecting the Linux Distribution / Version
Hi!
Just a quick method to (roughly) detect your linux distribution and version:
$ cat /etc/issue or $ cat /etc/*release
Cheers
Adobe Premiere Pro CS5 and the Long Loading Splash
Hi!
If you have used Adobe Premiere Pro CS5 (or several other CS5 products as I've read), you might have encountered long waiting times during the program launching. In the case of Premiere Pro CS5, the splash screen shows "Loading ExporterQuickTimeHost.prm" and sticks with it for a couple of minutes (yes, minutes). This is not even a one-time thing or a once-per-Windows-session, it happens each and every program launch.
When I researched this, I quickly found the answer in Adobe's forums: Premiere CS5 takes 5 minutes to start up
In fact, what's causing this is not just the Adobe program, but rather the combination of a firewall and the Adobe program. If you are as restrictive in terms of Internet access as I am, you might have forbidden Adobe Premiere Pro.exe outgoing IP connections altogether. However, it is trying to establish a TCP connection to localhost / 127.0.0.1.
The fix is to allow outgoing TCP (I chose IP, which of course includes TCP) to 127.0.0.1 for the following executables:
- <Premiere Directory>\Adobe Premiere Pro.exe
- <Premiere Directory>\32\Adobe QT32 Server.exe
- <Premiere Directory>\32\dynamiclinkmanager.exe
with <Premiere Directory> of course being the path to your Adobe Premiere directory.
Note: Of course you can still stop every other outgoing traffic. Regard the 127.0.0.1 rule as an exception.
If you are trying to apply this fix to other Adobe programs, you are on your own to find out which .exes require 127.0.0.1 TCP connections. With modern firewalls, however, this shouldn't be that big of a problem. Just look at the prompts your firewall pops up and/or determine the .exes via logging.
I hope that helps you enjoy your respective Adobe program(s) all the more.
Good luck and, as always, thanks for reading.
Update (2010-03-28):
I recently found out that with my kind of firewall "Adobe Premiere Pro.exe" would prompt me again for a rule for outgoing traffic to addresses different from the localhost zone. If that happens to you, make sure you don't accidentally replace or override the localhost rule you added above. Rather add an additional rule for all the remaining outgoing traffic and forbid it (or allow it, depending on what you want).
Internet Connection Reset on the Speedport W 722V (Type B)
Hi!
Since I've recently found out that my new router, the T-Home Speedport W 722V Type B, apparently does not support automatic disconnecting at a specific time (in order to circumvent the 24-hour connectionreset by my ISP), I took a route that my good friend Pool has been using for quite some time.
It is a batch script, so in order to use it, you have to be able to execute it.
On a side note, the Type A model of this router does support automatic disconnecting! Make sure you choose "Other provider" when you're in the internet configuration menu in order to be able to see the setting for that. The "T-Online" option sadly does not show it.
What you need:
- A Windows machine that is running at the given time (has to execute the script)
- cURL for Windows, preferably the win32-ssl-sspi version (download page). win32-ssl should be fine as well.
- Configure a scheduled task for the script, which is not covered in this guide (but quite simple. Just make it execute the script.)
The batch script:
REM Speedport W 722V Type B Internet Reset Script v1.0 - 2010-04-29 REM Written by pl (plee.me) REM REM Works with the T-Home Speedport W 722V Type B home router. REM START CONFIGURATION REM Adjust these variables to your own ones! SET PWD=12345678 SET COOKIEFILE="routercookies.txt" REM END OF CONFIGURATION @echo off curl -k https://speedport.ip/cgi-bin/login.cgi -d "pws=%PWD%" -e "https://speedport.ip/hcti_start_passwort.stm" -c "%COOKIEFILE%" curl -k https://speedport.ip/cgi-bin/status_startseite.cgi -d "connect=0&disconnect=1&block=0&nonblock=0&abc=0" -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%" curl -k https://speedport.ip/cgi-bin/status_startseite.cgi -d "connect=1&disconnect=0&block=0&nonblock=0&abc=0" -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%" curl -k https://speedport.ip/cgi-bin/logoutall.cgi -e "https://speedport.ip/hcti_startseite.stm" -b "%COOKIEFILE%" del "%COOKIEFILE%"
What this script does:
It logs on the web administration interface, uses a hidden option to disconnect the internet connection, then uses a hidden option to connect, and finally logs out again.
Because the cookie is cached in a text file, it is deleted at the end of the script.
Additional information:
The lines beginning with REM are comments, so you might as well leave them out.
If you run the script, make sure that you either have the cURL directory in the PATH environment variable, or that you set its folder as the working directory, so that it can find the curl.exe and actually execute the (central) steps of the script.
I'm sure that this script can be optimized (probably a lot), but for now, it's doing the job.
I hope that was of any help to you, and thanks for reading!