Max packet size

Posted in Miscellaneous, windows at 2:04 pm by

When you send a large amount of data over the internet that data is being split up into smaller packets and is reassembled on the receiver side. The maximum size of such an individual packet is called Maximum Transmission Unit (MTU), and refers to the size (in bytes) of the largest packet or frame that a given layer of a communications protocol can pass onwards.

If somewhere on your network a MTU value is changed this can cause havoc for your communications. You could end up with a dead vpn tunnel. A quick way to determine what the largest packet is you can send to an ip is to use ping.

PING google.be -f -l 1472

-f Set Don’t Fragment flag in packet.
-l size Send buffer size.

When you packet size is to big you will get:

Packet needs to be fragmented but DF set.

When the packet size is not to big, it will just ping.

Once you know what the MTU should be you can config this on the application/protocol which is having issues.


GIT Version system tutorial

Posted in Debian, Linux, Miscellaneous, windows at 3:53 pm by

GIT Version system

Git is a distributed file versioning system. It was initially created by Linus Torvalds. Linus is better known for the creation of linux.

This is some quick guide on getting started with GIT for people with a windows desktop and a linux server.

Download the windows GUI version of git from http://code.google.com/p/msysgit/downloads/list

Install it.

To create a new repository, only needed if you are starting a new project. If you are going to contribute to a existing project skip to the next section

Open a command line. navigate to the place where you want to start a new repository. Create a new directory for the repo.

md init_repo
cd init_repo
git init
cd ..

git clone –bare init_repo repo.git

Now upload the repo.git directory to your webserver. I do this with winscp, but you can use whatever way you like.

SSH into your server. Install git

apt-get install git-core

To get a existing git repo.

Open a command line.
Navigate to the directory where you want to have the repo.

git clone ssh://username@host.com/path_to_git_repo

I’m using ssh instead of the daemon as I don’t really see an option to password protect the repo.


Time synchronizing in windows

Posted in Miscellaneous, windows at 4:28 pm by

You can check the current time on your domain by typing in the following

net time

This gives me: Current time at \\s-dc1.mydomain.local is 3/31/2008 1:56 PM

To setup Time synchroniziation type in:

>net time /SETSNTP:\\s-dc1.mydomain.local

s-dc1.mydomain.local Local should be replaced with the servername where your time service is running. Now to check check what time server your pc uses type:

net time /QUERYSNTP


ASP_0131 Disallowed_Parent_Path

Posted in Miscellaneous, windows at 3:38 pm by

IIS 6 has by default parent paths disallowed. These settings are required to use relative paths in virtual includes.

Parent paths allow you to use ‘..’ when browsing directories and MapPaths etc enabling files in the parent directory to be used.

To enable parent paths:

• Start the Internet Services Manager (Start – Programs – Administrative Tools – Internet Services Manager)
• Right click on the web site and select properties
• Select the ‘Home Directory’ tab
• Click the ‘Configuration’ button under the Application Settings
• Select the ‘App Options’ tab
• Check the ‘Enable parent paths’ box and click Apply

You don’t need to restart the service for the change to take effect.


Restarting services from a batch

Posted in windows at 2:33 pm by

When some of your servers are running services which leak memory, you’ll find yourself in the position where you are restarting these services all the time. A good admin will get tired off this very soon and look for a way to automate this.
Automating this is very easy. You can use the windows scheduled tasks to run a bat file.

The bat file has to contain something similar to this:

net stop "ASP.NET State Service"
net stop "FTP Publishing Service"
net stop "ReportServer"
net stop "World Wide Web Publishing Service"
net stop "Simple Mail Transport Protocol (SMTP)"
net stop "IIS Admin Service"

net start "IIS Admin Service"
net start "Simple Mail Transport Protocol (SMTP)"
net start "World Wide Web Publishing Service"
net start "ReportServer"
net start "FTP Publishing Service"
net start "ASP.NET State Service"

When restarting theses services you must lookout for dependencies tho. For instance in the above bat file the World Wide Web Publishing Service depends on the IIS Admin Service. this means you can’t restart the IIS admin Service when the World Wide Web Publishing Service is still running.


What’s inside the svchost process?

Posted in windows at 11:28 am by

In the command prompt type:

tasklist /svc /fi “imagename eq svchost.exe”