2014-11-20

Windows built-in troubleshooting tools and basic example

#
Name
Protocol
TCP/UDP Ports
Description
Comment
1
ping
ICMP
NA
ping 1.1.1.1

icmp echo, icmp reply between both end systems.
Can be used to test MTU with additional parameters

ping -f -l 1472 destIP


This will try to send the packet with MTU 1500.

1472 + 8 ICMP Header + 20 IP header = 1500

Reduce 1472 to lower number if you get errors until you reach the number that works.

(linux uses udp ports in the range of 30'000 to 33'000 and needs to be forced to use icmp
ping -M do -s 1472 -c 1 destIP

2
tracert
ICMP
NA
traceroute -d 1.1.1.1


icmp echo, with increasing time to live, starts with 1 and usually ends at 30.

Every system on the way to the end system should return a Time to live exceeded message and therefore you will be able to identify the IP of a machine in the path
If the end system does not respond the tool will continue to present up to 30 entries all with ****

(-d does not resolve DNS names, which can take longer. Better for trouble shooting to start with -d and then if you need the names rerun or do a dns lookup individually for the ones you want.)

3
telnet
TCP
any
telnet 1.1.1.1 3389
telnet 1.1.1.1 389

Can be used to test TCP on specified ports.
Somewhat dangerous as it can be misleading without a network trace if it really worked or not.

The behavior should be that you connect and it erases the content of the screen and you have  a blinking cursor in the top left corner. To end the session sometimes you have to quit cmd completely.
4
nslookup
UDP (+ TCP)
53
nslookup 1.1.1.1 2.3.4.5
nslookup system.com. 2.3.4.5

Can be tested to query a DNS server, default is UDP connection
first parameter is the label which can be IP or DNS name, please make use of FQDN with the . at the end then it will only do 2 queries instead of x (based on search suffixes)

2nd is the DNS server you want to test.

If you are not doing zone transfer and the answer is less than 512 Bytes (usually all single client connections are less) then it's always UDP otherwise it can be TCP
5
net view
TCP
445
net view \\1.1.1.1


6
nbtstat
UDP
137
nbtstat -A 1.1.1.1

7
netsh


netsh trace start capture=yes persistent=yes tracefile=c:\temp\capture.etl

Do your tests and then stop

netsh trace stop

The file can then be analyzed by Microsoft Message Analyzer
The directory uses in tracefile= must exist before you can start.
8
procmon


    • Start the tool,
    • immediately click on the  zoom glass
    • then disable everything except the network button.
    • under advanced select drop filtered events
    • add filters such as path contains 127.0.0.1 exclude


This tool is not installed by default, must be downloaded from live.sysinternals.com, is a Microsoft official tool now. 

If you don't stop the collection and configure the settings the tool will respond very sluggish at best.
9
Message Analzer


Microsoft Network Analysis tool (Wireshark).

But very important it captures traffic before it hits the windows firewall, whereas Wireshark will not see the packets if blocked by the windows firewall.


On Windows packet captures can be created without installing any software.
10
QRadar


Use Netflow tool to verify if packets travelled and in which direction etc.

Network Activity, you'll be able to see in real time the flows

11
hfs


Not installed by default, small executable, is a http server for download and upload.

Used to upload captures to my client for analysis.


So a test series should look something like this:

  • ipconfig /all on both
  • route print on both
  • ping
  • tracert
  • telnet (must be added, usually can be done without installation path/dvd, just add feature)
  • net view
  • nbtstat
  • nslookup

Here is an example of a test protocol where A-B communication did not work (only UDP and ICMP issue on a single system) but for the windows guys it was both ways for A and B.

Firewall was on but allowed the packets specified. System was a DC so 389 was also used, regular windows system should have TCP/3389(rdp), TCP/445(smb) open as well as UDP/137. Not going into protocol specifics there is much better material available.

Ping
C
to
A
ok


C
to
B
ok


C
to
E
ok


C
to
F
ok


C
to
D1, D2, D3
ok


A
to
C
ok


B
to
C
ok


A
to
B
FAILED


B
to
A
FAILED


B
to
E
ok
same network as A

A
to
F
ok
same network as B

With the help of netflow and or wireshark, netsh trace, message analyzer or procmon it was seen that A does not process incoming ICMP and UDP packets.

Further tests:

telnet
C
to
B
3389
ok

telnet
C
to
B
389
ok

net view
C
to
B
445
ok

nbtstat
C
to
B
UDP/137
ok








telnet
C
to
A
3389
ok

telnet
C
to
A
389
ok

net view
C
to
A
445
ok

nbtstat
C
to
A
UDP/137
ok















telnet
A
to
B
3389
ok

telnet
A
to
B
389
ok

net view
A
to
B
445
ok

ping
A
to
B
icmp
FAILED

nbtstat
A
to
B
udp/137
FAILED








same tests
A
to
E

all ok!








telnet
B
to
A
3389
ok

telnet
B
to
A
389
ok

net view
B
to
A
445
ok

ping
B
to
A
icmp
FAILED

nbtstat
B
to
A
udp/137
FAILED








same tests
B
to
F

all ok!









TCP connections A - B all work, only icmp and udp fail. Then it got weirder as dns to primary dns was also failing, as well as ICMP but not to 2nd IP of the primary DNS.



Reboot of the server solved the issue, but I would love to have nailed it down, maybe with procmon but was not sure.

2014-11-06

XenMobile WorxWeb: Browsing in enterprise environment, Proxy, SSO *Update necessary, 54.9*

Update:
54.9 breaks XenMobile Browser Session Policy due to correctly processing of policy expression!

The policy expressions are wrong and I need to find out what will be the best policy for HTTPS and HTTP to go forward. This expression is wrong as it fires for anything with Mozilla and port 443 and even IE11 has a user agent containing Mozilla: 

REQ.HTTP.HEADER User-Agent CONTAINS Mozilla || REQ.HTTP.HEADER User-Agent CONTAINS com.citrix.browser

Most probably it is only required to keep com.citrix.browser? 

Original:
Deploying Netscaler globally in a corporate environment.

Use XenMobile WorxWeb application to achieve the following:

  • Access to internal http applications (SSO)
  • Access to internal https applications
  • Access to Internet http web sites via a Proxy
  • Access to Internet https web sites via a Proxy
After many hours we got this to work correctly and this is how:


  • FullTunnel for WorxWeb is a must, otherwise HTTPS via Proxy does not work
  • create a trafficPolicy for each requirement and a policyAction

This is a short summary of the 4 traffic policies:


intranet                - http, SSO          (filter on networks and port 80)
intranet-https       - tcp                     (filter on networks)
proxy-http           - http, proxy, proxy port, SSO (filter on port 80)
proxy-https          - tcp, proxy, proxy port (filter on port 443)


Citrix has many different setup possibilities but it's hard to find the correct to achieve what you want.

In this environment there are still some challenges:

  • multi-user active directory authentication
    • solved using a single LDAP policy using UPN to a Global Catalog Server
  • SSO issues with Proxy (407 Proxy)
    • UPN looks like \user.name@company.com and if you need only NTLM format this will not work
    • Citrix has a filed SSO Name Attribute and it actually works but setting it to sAMAccountName but this ends up with NETSCALER\user.name
      • This again can be fixed with some Session policies that match an active directory group that identifies the user as being part of a domain and then set the SSO Domain, but I have not yet implemented it.
      • The SSO Name Attribute could also be another attribute but I have not found one that is like the pre Windows 2000 displayed in dsa. And a custom attribute I won't propose.
    • Ultimately in this case proxy is used with authentication bypass
  • Kerberos SSO for internal web pages not yet configured

Here are the traffic policies necessary:

add vpn trafficPolicy HTTP-TP "(REQ.HTTP.HEADER User-Agent CONTAINS Mozilla || REQ.HTTP.HEADER User-Agent CONTAINS com.citrix.browser) && REQ.TCP.DESTPORT == 80" proxy-http
add vpn trafficPolicy HTTPS-TP "(REQ.HTTP.HEADER User-Agent CONTAINS Mozilla || REQ.HTTP.HEADER User-Agent CONTAINS com.citrix.browser) && REQ.TCP.DESTPORT == 443" proxy-https
add vpn trafficPolicy intranet-tcp "(REQ.IP.DESTIP == 2.10.0.0 -netmask 255.255.0.0 || REQ.IP.DESTIP == 10.0.0.0 -netmask 255.0.0.0 || REQ.IP.DESTIP == 5.1.12.0 -netmask 255.255.255.0)" intranet-tcp
add vpn trafficPolicy intranet-http "(REQ.IP.DESTIP == 2.10.0.0 -netmask 255.255.0.0 || REQ.IP.DESTIP == 10.0.0.0 -netmask 255.0.0.0 || REQ.IP.DESTIP == 5.1.12.0 -netmask 255.255.255.0) && REQ.TCP.DESTPORT == 80" intranet-http

bind vpn vserver vpngateway -policy intranet-http -priority 40
bind vpn vserver vpngateway -policy intranet-tcp -priority 50
bind vpn vserver vpngateway -policy HTTP-TP -priority 100
bind vpn vserver vpngateway -policy HTTPS-TP -priority 110

add vpn trafficAction proxy-http http -SSO ON -kcdAccount NONE -proxy 1.2.3.4:8080
add vpn trafficAction proxy-https tcp -kcdAccount NONE -proxy 1.2.3.4:8080
add vpn trafficAction intranet-tcp tcp -kcdAccount NONE
add vpn trafficAction intranet-http http -SSO ON -kcdAccount NONE

2014-10-27

ntfs-3g legacy: how to get rid of it without having system preference pane

somehow I had some legacy setup of ntfs-3g and this is how I got rid of it:

sudo rm -r /Library/PreferencePanes/NTFS-3G.prefPane
sudo rm -r /System/Library/Filesystems/ntfs-3g.fs
sudo rm /sbin/mount_ntfs-3g /sbin/newfs_ntfs-3g
sudo rm /usr/local/bin/fuse_wait /usr/local/bin/ntfs-3g /usr/local/bin/ntfs-3g.probe /usr/local/bin/ntfs-3g_daemon /usr/local/bin/ntfscat /usr/local/bin/ntfscluster /usr/local/bin/ntfscmp /usr/local/bin/ntfsfix /usr/local/bin/ntfsinfo /usr/local/bin/ntfsls
sudo rm -r /usr/local/include/ntfs /usr/local/include/ntfs-3g
sudo rm /usr/local/lib/libntfs.* /usr/local/lib/libntfs-3g.* /usr/local/pkgconfig/libntfs-3g.pc
sudo rm /usr/local/sbin/mkntfs /usr/local/sbin/ntfsclone /usr/local/sbin/ntfscp /usr/local/sbin/ntfslabel /usr/local/sbin/ntfsresize /usr/local/sbin/ntfsundelete
sudo rm -r /usr/local/share/doc/ntfs-3g /usr/local/share/doc/ntfsprogs
sudo rm /usr/local/share/man/man8/libntfs-gnomevfs.8 /usr/local/share/man/man8/mkfs.ntfs.8 /usr/local/share/man/man8/mkntfs.8 /usr/local/share/man/man8/mount.ntfs-3g.8 /usr/local/share/man/man8/ntfs-3g.8 /usr/local/share/man/man8/ntfs-3g.probe.8 /usr/local/share/man/man8/ntfscat.8 /usr/local/share/man/man8/ntfsclone.8 /usr/local/share/man/man8/ntfscluster.8 /usr/local/share/man/man8/ntfscmp.8 /usr/local/share/man/man8/ntfscp.8 /usr/local/share/man/man8/ntfsfix.8 /usr/local/share/man/man8/ntfsinfo.8 /usr/local/share/man/man8/ntfslabel.8 /usr/local/share/man/man8/ntfsls.8 /usr/local/share/man/man8/ntfsmount.8 /usr/local/share/man/man8/ntfsprogs.8 /usr/local/share/man/man8/ntfsresize.8 /usr/local/share/man/man8/ntfsundelete.8

2014-10-14

Excel: Conditional Formatting of cells that contain question mark as text filter (use tilde question mark)

~?

If you want to color code some excel cells (conditional format) based on text value and the text value is a question mark, then use tilde question mark, otherwise it will match any character!

Google Missing functionality that I would like to add: News aggregation based on some sources

I believe that many people have their preferred news sources, based on a number or criteria.

Currently I use feedly and google+ and am disappointed in that it does not really help me use my time more wisely. I spend too much of my thought capacity and stress my eyes just to scroll through the messages of about 25 news sources.

No personal favorisation.
No news aggregation.
No multi language news aggregation.
No timeline and link to origin.
No peer rating and quality assesment.
No writer rating.
No suggestions for more news sources based on topic and some of the above points.
No auto translation with quality of translation rating for languages that I don't speak or do not speak good enough.
No theme based history and timeline of worthy articles based on some of the above points.
No partial article insertion, side by side view.
No resource aggregation (besides text). Show all images, audio, videos related
No video dissection and transformation to text, same goes for documents

Summly.com seems to have addressed certain problems, but I was not using it. Only after Yahoo released News Digest, did I start using it and stopped soon thereafter as it was showing content not really relevant to me and my liking or peer liking.

One of the worst usually is that all players ignore the fact that many people really try to speak more than one language and are actually interested in more than one place.

I've tried to use Google News and failed, tried to use Google Alerts and failed, tried MSN, yahoo and many others (Google Reader, Current, Flipboard, Pulse). Also I have a hard time finding articles that I read in the past and where, Apple's reading list does not really help, Pocket and others also not really.

I believe this can be done and would improve everyone's live. I would like to spend time building it (requirements are google computing resources, google APIs, a new computer language for people that don't like to code what trillions of people have already built, some clever people with drive).

No personal favorisation.

I like TheVerge, Wired, Heise, Caschys Blog, NYT, Cult of Mac, some others only partially, while others only very rarely (such as CNET).

I also do like about 150 Topics. (Summly seems to have addressed this, shame that I was not able to test it).

No news aggregation.

Same story, multiple languages, from all preferred news sources, flexible display start with highest rated writer, news source, most complete story, peer rating, complement by others, if only referencing original story outside of news sources link to original story and inserts bits and peaces by others (visible), maybe see where the stories divert, try to judge deviations and backup this with more data.
Offer more news sources if multiple factors are in favor, allow for my own rating (others can follow, i.e. benefit from my rating if they choose), allow for errors in my judgement, sometimes ignore my judgement.

What is the same story, what is a complete story, what is a diversion. Show visibly allow for MindMapping style of navigation drill down and up, move to the side etc.

No multi language news aggregation. 

I like stories in English and German, but I have tried to read some in Italian and French, did not even try to read Mandarin (my 1 year training does not really help) and other languages will have good news sources. the stories of my favorite languages must be combined.

No timeline and link to origin.

When showing a story, show the timeline of where the news originated, show time and date of the news article published allow display based on that, show origin of parts of news. Visibly.

No peer rating and quality assessment.

If Steven Levy points out an article to read, I'm more likely to read it than if it just is some article that is in some RSS feed of my non favorite writer and news source.


No writer rating.

Again, there are writers out there that I really enjoy reading.

I enjoy Caschy, but not some other writers on his blog, I enjoy Walt Mosberg, David Pogue, Steven Levy, and hundreds of writers that I cannot name from NYT, TheVerge, Wired, local news...


No suggestions for more news sources based on topic and some of the above points.


No auto translation with quality of translation rating for languages that I don't speak or do not speak good enough.

Add stories from languages that I don't speak, translated and if available have some rating of the quality of the translation also allow me to dislike certain translations, allow other users to aid in the process of improving the translation.


No theme based history and timeline of worthy articles based on some of the above points.

No partial article insertion, side by side view.

No resource aggregation (besides text). Show all images, audio, videos related


No video dissection and transformation to text, same goes for documents

There are videos out there that cover the same story, but I don't have the time to watch all the videos or am not capable of, but would love to get the bits and pieces if they add to the content or to compare to the written word stories and then judge if it is worthy to read. Segment videos, display images of the relevant parts that add visually to the story.

Oops, time flies and I have to work on something else now, let's hope that I will be able to work on the many ideas I have.

2014-10-12

HTTP/1.1: Still trying to understand, but now there are a set of new RFCs to the rescue

The IETF just published several new RFCs that update HTTP/1.1:
These documents make the original specification for HTTP/1.1 obsolete. As a HTTP geek, this is a big deal.

This is from:

Logitech K480: Disappointment on first touch (It's a play toy)

After reading the first reviews I was sure that logitech has made further advancements and produced a high quality product that is truly usable at the best price possible.

But:

- It's heavy
- It's plastic
- It feels cheap
- The keyboard spacing is not good
- And typing on the keyboard feels like your baby toys keyboard


2014-10-07

Excel: Hide content of cell

http://office.microsoft.com/en-001/excel-help/hide-or-display-cell-values-HP005255043.aspx

  • To hide all values, click Custom in the Category list, select the existing codes in the Type box, and then type;;; (three semicolons) in the Type box.

2014-10-01

How can I store my Wireshark captures on iCloud drive on a MAC OS X 10.10? Works for dropbox and google drive.

Wireshark 1.12.1 cannot save captures to iCloud drive?

Don’t know what path to browse or type in, anyone?


Most probably some X11 limitation not to be able to go to or some strange path?