Categories
Geeky/Programming

T-Mobile Hotspot and OpenDNS – They Hate Each Other (And how to mend the relationship)

Whenever I go to Starbucks to work, I connect to T-Mobile hotspot, since it is included with my phone plan. Cool right? Well, not really. At home I have Comcast, whose DNS really really sucks. So I used OpenDNS, which rocks, and never has issues.

Thing is, because T-Mobile hotspot uses DNS to verify you and make you login through their “intranet” page, you can’t use OpenDNS, so I have to go switch my DNS Settings every time I want to connect, that is no good, gotta be an easier way right? Oh there is…dug into “netsh” (I tested this on Windows Vista)

Create two batch files:

————————————–

Set DNS Dynamic.bat

netsh interface ip set dns “Wireless Network Connection” dhcp

————————————–
and then…

————————————–

Set DNS OpenDNS.bat

netsh interface ip set dns “Wireless Network Connection” static 208.67.222.222
netsh interface ip add dns “Wireless Network Connection” 208.67.220.220 index=2

————————————–

this assumes that your wifi connection in your network connection is named “Wireless Network Connection”. Run the Set DNS Dynamic when you are at Starbucks, run the other one when you get home. Easy!

I find this really helpful because in Vista, to get to your network properties for TCP/IP is like 18 steps/clicks, which is really a debacle when you just want to get on the Internet at a coffee shop!

Technorati tags: , , , , , , , , , , , ,
Categories
Geeky/Programming Life

T-Mobile Hotspot Access with Total Internet Add-On

A few months back when I got my T-Mobile Dash, it comes with the “T-Mobile Total Internet Add-on” which says “T-Mobile Internet with Hotspot”.

Ok, cool. Access to their hotspots at Starbucks, Hotels, Airports, etc, right? Well fine, but what is my username/password for the site? (hotspot.t-mobile.com)

Tried my phone #, and T-mobile password, nothing, just couldn’t figure it out. Finally stumbled across it on howardforums wiki – 10 digit phone number and last four of SSN, and on login it asks you to change.

So now, cool, I have access to the hotspots, This week it looks like I am going to have to try to get out of the “office” and work from a Starbucks for an afternoon, just to get some human interaction 🙂

 

Technorati tags: , , , , , ,
Categories
Random

Finally, Connected!

image

Technorati tags: ,
Categories
Geeky/Programming

Vista – Hide Ad-Hoc Networks

Since I am getting my Internet today, this probably isn’t such a big deal, but for the past few days I have been “borrowing” the coffee shop’s wifi below my apt. Comes on in the morning, shuts off at night. But, there are like 20 wifi points in the list to connect to. I hate ad-hoc networks, they just seem shady.

So, if you want to hide them from the list:

netsh wlan add filter permission=denyall networktype=adhoc

To reverse this again run the following:

netsh wlan del filter permission=denyall networktype=adhoc

Technorati tags: , , , , , ,
Categories
Geeky/Programming

Blackberry Tethering: Error 718

Tonight I was helping out a friend with her T-Mobile Blackberry, trying to get it to tether to her laptop so she could use it for Internet.

Weird thing is, it worked 2 days ago. All of a sudden, stopped working. I tried everything, followed the forums and advice, turned off settings, removed all software, re-added modem, etc etc. Still got Error 718 (it’s a dial up networking error, and since I haven’t been on a modem in like, 10 years, I was cringing). The one thing that most places say is to add DNS entries instead of having DHCP set up for the dial up networking TCP/IP

Anyways, here is the stupid fix.

REBOOT THE PHONE!

Argh! What a waste of like 2 hours “F’n the D” with settings.

Or, on the other hand, just don’t get a Blackberry to begin with 🙂

Technorati tags: , , , ,

Categories
Geeky/Programming

Hacking Wifi – Analogies

Well, if you have ever had to “borrow” someone elses wifi connection – here is what I was thinking about today. 1st, there have been cases where people get prosecuted for hacking others wifi. Here are my thoughts on why I dont think it is stealing.

1) If someone has their sprinkler on in their yard and it happens to spray onto the street partially, and you are on the street, and fill up a bucket with water, is it stealing?

2) Your neighbor has a huge picture window, and a huge TV. You live close by. You can watch TV through the picture window just fine. Is this stealing?

3) Back to the sprinkler – what if your neighbor’s sprinkler hits your yard a bit – stealing?

4) Where is the line drawn? If it is a windy day and your neighbor’s leaves from their tree blow in your yard, who should rake them?

5) It is to easy to secure. Don’t broadcast your SSID, turn on MAC address filtering, Using WEP/Tkip, etc. If you do all of these things, and then someone gets your connection – well then it is probably is serious hacking going on, and might be considered a crime.

6) If you have your stereo on and I can hear the CD you are playing – should I have to pay for the CD? phhhh

The bottom line is, people need to be responsible for the technology they own. Just like the guy who needs to be responsible for his sprinkler, TV, radio. Be responsible, take 2 minutes to read up how to secure your wifi router. If not, then expect your connection to be used. 🙂

Categories
Life

Firewall

I watched the dvd, Firewall, and I thought it was totally cool when he took his fax apart, hooked it up to his Ipod and then used it to steal the bank account #’s. Mad hack, not sure if it would work though, I guess if you had some software to power it. – Pretty cool!

Categories
Geeky/Programming Product Reviews

ScaleOut StateServer

ScaleOut Software has a product to manage sessions on a web farm. I have tried this product and have had nothing but issues. I did actually end up getting it working once, but it turns out, even when it does work correctly, it gives your network problems

It seems that the fix for any issue is “You arent running the latest version” – which might be true, but many times, we would be running version 1.3.2 for example that we downloaded two days ago, and then they release 1.3.2.1 the day after we downloaded 1.3.2 – this is a cop out in saying that its on our end, when in reality it is just buggy software that has releases every other day to fix bugs. I dont know if there is any other competing product in the market right now though, so they kind of have it locked. You can use Microsoft’s ASP.Net Session provider, but that is limited when in a farm scenario. Using MSSQL for your sessions has performance issues. I have heard that ex-microsofties tell people to just roll their own, but that seems too much, especially in a small shop. Hopefully ScaleOut gets more stable, because it could be a good product, if it just didn’t cause issues 🙂

Categories
Geeky/Programming

How To Make Your Own Syslog Sever in VB.NET

In networks all over, many devices can send Syslogs to a syslog server. You can download Syslog Servers (like Kiwi) to capture and process the syslogs, or you can create your own server to catch all the syslogs on your network. Then you can parse them to a database and write your own reports of them, having full control of everything.

First, in VB.Net, you need to import some namespaces.

Imports System.IO
Imports System.Net.Sockets
Imports System.Net
Imports System.Text

Then, from you Main procedure, call a procedure called ListenForSyslogs

Private Sub ListenForSyslogs()

Dim ipeRemoteIpEndPoint As New IPEndPoint(IPAddress.Any, 0)
Dim udpcUDPClient As New UdpClient(514)
Dim sDataRecieve As String
Dim bBytesRecieved() As Byte
Dim sFromIP As String

Try
While True
bBytesRecieved = udpcUDPClient.Receive(ipeRemoteIpEndPoint)
sDataRecieve = Encoding.ASCII.GetString(bBytesRecieved)
sFromIP = ipeRemoteIpEndPoint.Address.ToString

FillLog(sDataRecieve, sFromIP)

Console.WriteLine(sDataRecieve)
sDataRecieve = ""
End While
Catch e As Exception
' just ignore for now
End Try
End Sub

If you analyze this code, it just sets up a endpoint on the IP you are running the program, and listens on port 514, the default syslog port. It will just run and run, and keep listening. Whenever you recieve data, then call FillLog procedure

Private Sub FillLog(ByVal sSyslog As String, ByVal sFromIp As String)

Dim sPriority As String
Dim sPath As String = System.Environment.CurrentDirectory & "Unprocessed"

sSyslog = sSyslog.Replace(vbCrLf, "")
sSyslog = Mid(sSyslog, InStr(sSyslog, ">") + 1, Len(sSyslog))
sSyslog = Trim(sSyslog)

sPriority = GetSyslogPriority(sSyslog)

Dim swWriter As New StreamWriter(sPath & "syslog" & Now.Month & Now.Day & Now.Year & Now.Minute & ".txt", True)
swWriter.WriteLine(sFromIp & "," & Now & "," & sPriority & "," & sSyslog)
swWriter.Flush()
swWriter.Close()

End Sub

What FillLog does it look at data recieved, and parses it out, removing line feeds, etc.

Then it gets the priority from a function GetSyslogPriority(). Then it writes out the info to a comma seperated txt file (for easy parsing later), that is named pathsyslogmonthdayyearminute.txt so for example, c:unprocessedsyslog0408200529.txt

It will append to that txt for for the minute it gets syslogs for. So you should probably have another process that will consume that txt file before the next hour rolls around.

Finally, the function that gets the priority:

Private Function GetSyslogPriority(ByVal sSyslog As String) As String
Dim sResult As String

If InStr(sSyslog, "-0-") Then
sResult = "Emergency (0)"
End If

If InStr(sSyslog, "-1-") Then
sResult = "Alert (1)"
End If

If InStr(sSyslog, "-2-") Then
sResult = "Critical (2)"
End If

If InStr(sSyslog, "-3-") Then
sResult = "Error (3)"
End If

If InStr(sSyslog, "-4-") Then
sResult = "Warning (4)"
End If

If InStr(sSyslog, "-5-") Then
sResult = "Notice (5)"
End If

If InStr(sSyslog, "-6-") Then
sResult = "Info (6)"
End If

If InStr(sSyslog, "-7-") Then
sResult = "Debug (7)"
End If

If sResult = "" Then
sResult = "UNKNOWN"
End If
Return sResult

End Function

To summarize, you can capture syslogs from your network to text files, and then create another program to read in the text files to a database and write reports. Creating the UDP listener on port 514, you can setup your network devices to dump syslogs to your box where you are running the syslog server you created. To troubleshoot network issues, syslogs will give you a good idea of what is getting denied, etc, and you can create your own homegrown Syslog Server using VB.NET in a few simple steps.

Enjoy!

Categories
Geeky/Programming

Linksys WRV54G Wireless VPN Router

For xmas, I got a Linksys WRV54G Wireless VPN Router. I set it up and it worked good, wireless worked, wired work, etc. You are supposed to be able to use it as a VPN endpoint, so I decided to try it.

First thing I did, was upgrade the firmware. I was running 2.10. I downloaded the latest version (2.37) and upgraded it. Once I logged back in, I saw new options for VPN Clients, etc, so I figured I was going in the right direction. I could still get on the net, so hopefully it worked. Then I tried to VPN in to my connection from an outside connection, using the Linksys QuickConnect Client. No Luck. I figured what the hey, I have some setting wrong. Then I tried to VPN out to a remote location (which worked before the firmware upgrade) using a Cisco VPN Client. No Luck. WTF? So after a few hours of fiddling with settings and it still not working, I put firmware 2.10 back on. Lo and behold I could VPN Out again, but something else broke. My website I run wasnt working (port forwarding in the router). Darn it!!! So I upgrade firmware to 2.25 – nothing. My last resort. Firmware 2.36. Once I loaded that, I could get on the net, I could VPN to the remote location, and my website worked. Ok, one last thing to test, VPN in to my connection from a remote location. I added a VPN user and the router prompted me to change my internal network to 10.x.x.x network instead of 192.168.1.x network. I figured something must be working. I had to change the static ip of my server to the 10.x.x that i got, and then I could connect to everything internall. I connected to a remote connection, and tried VPN in to my apt. Wow, it actually worked. I could map a drive to my server.

After searching numerous KB’s and website, here is what I have seen.

1) People dont understand the differnce between VPN’ing out, and VPN’ing in. Routers have VPN Passthrough on them so you can VPN out. VPN Passthrough is like one setting to open many ports for you, just so VPN works.

2) VPN Endpoint on this router is configured by default, you just need right firmware and to add a user. You DO NOT need to set up VPN Tunnels! The page in the Admin area for VPN Tunnel and VPN passthrough is misleading. They shouldn’t be on the same page!! If you are going to set up a tunnel, the other end of the tunnel needs to know about you, and you will be connected 24/7. It isn’t like connecting with a VPN client and disconnecting!!

I hope someone out there who is having problems with their WRV54G reads this. Before I got it to work, I figured it was a piece of junk. Now it works great. You just need to have patience. If anyone needs help, just let me know and I can give advice on how to get it rolling.