Accessing PC Financial Online Banking in Linux

So, it wasn’t that PC Financial’s online banking server was retardedly slow. It also wasn’t that my laptop was improperly configured. It was that PC Financial’s servers don’t properly handle TCP Window Scaling (at least the way that Linux follows the 1992 spec). So, after going through some Ubuntu posts from many others having the same difficulties, I put together my own solution for Mandriva that doesn’t break my laptop for all the rest of the (properly configured) Internet, plus it happily travels between networks and between interfaces. Anyhow, here’s my Bash code:

#!/bin/sh

DEF_ROUTE=$(expr match "$(ip route show to 0.0.0.0/0)" 'default via \([0-9.]*\)')

if [ -n "$DEF_ROUTE" ]
then
    if [ -n "$(ip route show to 159.231.80.212)" ]
    then
        ip route del 159.231.80.212
    fi

    ip route add 159.231.80.212 via "$DEF_ROUTE" window 65535
fi


I placed the above code in both /etc/sysconfig/network-scripts/ifup.d/pcfinancial and /etc/sysconfig/network-scripts/ifdown.d/pcfinancial, and things now work auto-magically.

This entry was posted in Technology. Bookmark the permalink.

12 Responses to Accessing PC Financial Online Banking in Linux

  1. dan saul says:

    Thank you, this has been bugging me for weeks!

  2. dan saul says:

    Admendment, for arch linux add “route add -host 159.231.80.212 gw 192.168.1.1 window 65535″ to /etc/rc.local

  3. Roy says:

    Thanks so much!
    Your posting allowed me to adapt your solution to my system and fix this worse-than-toothache problem.

    Oh man, so much time wasted waiting for those bits to stagger in…

  4. David Frey says:

    This is awesome! pcfinancial.ca is so much more responsive after I run this. (Kubuntu 8.10)

    I modified the script a bit to lookup the IP rather than hard-coding it:

    #!/bin/sh

    DEF_ROUTE=$(expr match “$(ip route show to 0.0.0.0/0)” ‘default via \([0-9.]*\)’)

    if [ -n "$DEF_ROUTE" ]
    then
    if [ -n "$(ip route show to 159.231.80.212)" ]
    then
    ip route del 159.231.80.212
    fi

    ip route add 159.231.80.212 via “$DEF_ROUTE” window 65535
    fi

  5. David Frey says:

    I’m sorry, I accidentally pasted the original. Here’s my update again:

    #!/bin/sh

    DEF_ROUTE=$(expr match “$(ip route show to 0.0.0.0/0)” ‘default via \([0-9.]*\)’)
    PC_FINANCIAL_IP=$(expr match “$(host http://www.txn.banking.pcfinancial.ca)” ‘.* has address \([0-9.]*\)’)

    if [ -n "$DEF_ROUTE" ] && [ -n "$PC_FINANCIAL_IP" ]
    then

    if [ -n "$(ip route show to $PC_FINANCIAL_IP)" ]
    then
    ip route del “$PC_FINANCIAL_IP”
    fi

    ip route add “$PC_FINANCIAL_IP” via “$DEF_ROUTE” window 65535
    fi

  6. David Frey says:

    The comment formatting and URL parsing screwed things up. Here’s a link to the modified version:

    http://goestoeleven.org/misc/scripts/pcfinancial_routing.sh

  7. James says:

    Awesome! I have been bugged by this for ages!

  8. Ryan says:

    Thank you so much!!!!! I too have been so bugged by this! You have saved me hours of waiting and waiting.

  9. shwacko says:

    Hey! Thanks a bajillion for this. I knew PCF would never fix it. I am glad someone hacked out a script. It works like a charm on my Mint Linux 64-bit 6.0 install.

  10. Diakronik says:

    I believe PCF has rectified this issue now. I didn’t make any change on my box (Kubuntu 8.04) and the site has been nice and snappy for several days now.

    D.

  11. Cliff says:

    It appears that PCF has fixed the issue to me too.

  12. Dan Saul says:

    For all those who still have the problem and have arch linux I have created a package to work around using David Frey’s script.

    http://aur.archlinux.org/packages.php?ID=24634

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>