Berkeley CSUA MOTD:Entry 33626
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/24 [General] UID:1000 Activity:popular
5/24    

2004/9/19-20 [Computer/Networking, Computer/SW/Languages/Misc] UID:33626 Activity:high
9/19    I'm looking for a simple but good load balancing appliance to sit
        in front of two boxes for the purposes of redundancy.  Load Balancing
        isn't really required, I just want the device to send traffic to
        the secondary box iff the first server goes down. Recommendations?
        \_ An OpenBSD 3.5 box running pf + carp can do this. If you don't
           want to use OpenBSD you can try ucarp: http://www.ucarp.org
           \_ I considered this kind of virtual IP solution, but there are
              lots of situations where an app server is down but the host
              still responds to a ping.  A Load balancer solution would be
              better if it could check the port to decide if it is up or
              not.  (which I think is the way they do it, no?)  Optimally
              I'd be able to tell the load balancer  "check this url for this
              answer or consider it down", but that seems like something I'm
              unlikely to get from some off the shelf appliance.  (I want an
              appliance as it should be more reliable than a pc (?) ).  How
              expensive is a small bigIP box or something like that?  I can
              spend a couple grand on this.
              \_ My knowledge of CARP is limited, but it is based on the
                 tx/rx of signed adv. not just ip pinging, so detection
                 of a host that is down but still pingable is not an issue.
                 It can't tell that your http server is down though.
                 I'm not sure what the cheapest soln is, but I've seen
                 lots of people use alteon boxes.
              \_ a pair of bigIP boxes should run you under 2k easily, check
                 fleabay.  I'm assuming you want two, to avoid moving the
                 single point of failure to the bigips.  We have a pair at
                 work... when I started, the active one would crash about
                 once a week.  We haven't done anything major to them (only
                 adding more IPs/services) but now it's not crashing.  They
                 will do ICMP/TCP/HTTP/HTTPS monitoring.  You might as well
                 do load balancing since you get it for free.
                 \_ Hmm, these are pricey.  Any "application switch" type
                    products that don't cost 10K new?
                    \_ Apache+modproxy with a smart proxy list handler.
                       \_ O.K. I can't actually use this solution because the

                          client wants a hardware box.  (there are advantages,
                          e.g. flash memory is more reliable than a harddrive)
                          But, I'm curious as to how a smart proxy list handler

                          would work.  URL?
                          \_ http://www.arachna.com/edu/talks/loadbalancing/slides/mod_rewrite_1_of_2.html
                          \_ http://tinyurl.com/4qzvt
                             the RewriteMap script (slide 11) can do whatever
                             you want.  I've set one up where it stats a file
                             containing valid hosts, rereads it if it has
                             changed, and set up a monitoring script that
                             updated that file.  That monitor script can
                             do whatever you want it to. --scotsman
                             do whatever you want it to as well. --scotsman
                    \_ okay, I actually went and looked on ebay.  The p3-550's
                       that we have have buyitnow prices of $300 ea.
                \_ if you want an appliance type box to do this, the arrowpoint
                   (now cisco 5000) devices would do it and quite well. Again
                   you might find these on Ebay for not to much. -EricM
                   \_ ExtremeNetworks also make a little switch (1i?)
                      that can do this.
2025/05/24 [General] UID:1000 Activity:popular
5/24    

You may also be interested in these entries...
2009/11/4-17 [Computer/SW/P2P, Computer/Networking, Computer/SW/Security] UID:53495 Activity:nil
11/4    Holy cow, I got a warning from my ISP that they were notified
        by BSA/baytsp.com that I was copying music/video/software.
        Do they do port scan or something? That's a first for me.
        \_ They hang out on P2P networks and track IP addresses.  -tom
           \_ I believe they are paid by content providers to perform this
              monitoring service, so you should only run this risk with content
	...
2008/11/7-13 [Computer/Networking] UID:51876 Activity:low
11/7    Need help on http proxy. After I VPN to work, I'd like to tunnel
        all the traffic to my machine. How do I setup my machine (Linux)
        as a proxy server so that my home computers can route through it?
        I'm asking because the site we're testing on requires that we
        come from the same IP. If I use VPN, the server will reject me
        based on the fact that it's a different IP than my work Linux.
	...
2008/8/5-10 [Computer/Networking] UID:50788 Activity:nil
8/5     It looks like my company has started blocking HTTPS tunneling.
        I used to do this by tunneling SSH through the HTTP/HTTPS proxy
        server, but this seems to have stopped working. Does anyone know
        how the implementation of tunneling detection works, and whether
        there are widely available implementations? We run a bunch of MS
        stuff, so I imagine we're running an MS proxy server or something.
	...
2006/6/16-19 [Computer/Companies/Google] UID:43418 Activity:nil
6/15    Oh dear lord.  It seems SpamCop is blacklisting certain IPs used by
        Gmail.  Gmail does not reveal the sending IP for privacy reasons, so
        when Gmail users send mail to honeypots, Gmail's servers get
        blacklisted.  Has anyone else noticed this?
        \_ SpamCop has long been a bastion of incompetence. --scotsman
        \_ If you're a proxy for spam you should be blocked the same as direct
	...
2006/2/18-23 [Computer/Networking] UID:41923 Activity:low
2/18    My DSL modem's ip address is 192.168.0.1, my internal network
        behind my router is 10.0.0.x. Is there a way I can configure
        the router so I can access the DSL modem from my 10.0.0.x
        network directly without re-wiring? Static routes? I tried it
        but no much luck. I also tried changing my internal network to
        192.168.0.x, but still does not work. Thanks.
	...
2006/1/22-24 [Computer/Networking] UID:41477 Activity:nil
1/21    I am trying to setup a small network for my girlfriend's
        mom's company.  They just bought an accounting package
        which requires windows 2003 server.  And they want internet
        access from each computer.  How should the network be setuped?
        Would it be dumb to use static IP for each computer and a
        computer as internet gateway?
	...
2005/8/29-30 [Computer/Networking] UID:39329 Activity:moderate 54%like:37400
8/29    What's the difference between a hub, a switch and a router?  Thx.
        \_ AFAIK, probably be corrected by someone:
           hub: Allows communication on a LAN with bandwith shared amongs all
                the nodes on the hub and maxing out at the max line speed.
           switch: Allows communication on a LAN with bandwith greater than
                the max line speed (point to point)
	...
2005/6/2-3 [Computer/Networking] UID:37941 Activity:moderate
6/2     I've been to many places and almost every place I go to have
        802.11b/g. However, almost all of them have protected access,
        which I presume they use because they don't want people stealing
        their bandwidth. So here is one idea I think will really
        revolutionize 802.11X... an option in the router that allows you to
        specify the percentage of unprotected bandwidth you are willing to
	...
2005/2/25-27 [Computer/Networking] UID:36421 Activity:moderate
2/25    What is the smallest (physical and price) cisco router that can
        handle BGP?  It should be able to have more than 256 ram.
        \_ When you say ``handle BGP'', do you mean supports the bgp
           protocol or supports enough ram to keep a reasonable (what do you
           consider to be reasonable) number of routes in memory?  Do you want
           to be peering at PAIX, or do you just need a router to run the T1
	...
2005/1/10-11 [Computer/SW/OS/VM] UID:35635 Activity:kinda low
1/10    VMware question for VMware gurus only. I've installed a WinXPsp1
        on top of WinXPsp2. How do you do the followings:
        1) transfer data between the two machines? I've tried mounting
           raw partition from WinXPsp1 but when I disable write, it
           doesn't boot up anymore (WinXP insists on writing)
        2) communicate between the two machines? I can ping WinXPsp1
	...
2004/11/9 [Computer/Companies/Google, Computer/SW/OS/VM] UID:34777 Activity:high
11/9    I have two versions of MSIE 6.0.2800.1106. One is running inside a
        VMWare virtual machine, the other running native on an athlon PC.
        When I run a google query: http://www.google.com/search?q=canada.ca
        They get slightly different results. What's the best way to figure
        out why this would be?  Perhaps a way to capture the request?
        \_ Maybe you're just hitting different google mirrors, and their
	...
2004/8/24 [Computer/Networking] UID:33119 Activity:nil
8/24    To those with Cisco/router fu:
        My co-worker walked over and asked me what the "set default interface"
        command does if you don't specify a next-hop IP address.  I said
        you always need a next-hop IP address, unless you expect the
        destination IP address in the IP header to be on the directly connected
        network.  He said it will broadcast on that interface.  I'm googling
	...
2012/4/27-6/4 [Computer/SW/Languages/Misc, Computer/SW/Unix] UID:54372 Activity:nil
4/27    I wrote a little shell script to collect iostat data:
        #!/bin/bash
        DATE=`date +%m%d`
        DATADIR=/var/tmp/user
        OUTPUTFILE=$DATADIR/$DATE.out
        while true
	...
2012/5/8-6/4 [Computer/SW/Unix] UID:54383 Activity:nil
5/8     Hello everyone!  This is Josh Hawn, CSUA Tech VP for Spring 2012.
        About 2 weeks ago, someone brought to my attention that our script
        to periodically merge /etc/motd.public into /etc/motd wasn't
        running.  When I looked into it, the cron daemon was running, but
        there hadn't been any root activity in the log since April 7th.  I
        looked into it for a while, but got lost in other things I was
	...
2011/10/26-12/6 [Computer/SW/Unix] UID:54202 Activity:nil
10/24  What's an easy way to see if say column 3 of a file matches a list of
       expressions in a file? Basically I want to combine "grep -f <file>"
       to store the patterns and awk's $3 ~ /(AAA|BBB|CCC)/ ... I realize
       I can do this with "egrep -f " and use regexp instead of strings, but
       was wondering if there was some magic way to do this.
       \_ UNIX has no magic. Make a shell script to produce the ask or egrep
	...
2011/7/30-8/10 [Computer/SW/Languages/Misc] UID:54148 Activity:nil 66%like:54150
7/29    Happy Sysadmin Day
        \_ our "sysadmin" today deleted /home. When we asked her why
           she said she didn't do it. When I checked the sudo logs,
           I found these two commands in order:
               COMMAND=/bin/rm -r /home testuser
               COMMAND=/bin/rm -r /home/testuser
	...
2011/5/19-7/13 [Computer/SW/Languages/Misc] UID:54115 Activity:nil
5/19    If script A runs, and calls script B ..... is it possible for me to exit\
        script A based on results of script B and not continue?
        \_ assume any shell
        \_ Yes.
           \_ without passing the result to some stupid temp file?
              \_ It sounds like you want "scriptb || exit", which will run
	...
2010/4/22-5/10 [Computer/SW/Languages/Misc] UID:53797 Activity:nil
4/22    In Linux is there an easy way to rename the scripts in /etc/rc?.d ?
        For example I want to set all the /etc/rc?.d/S91apache to S100apache
        so that it'll run the ramdisk BEFORE going to apache.
        \_ Sure, just move them.
           \_ I mean is there a script that will rename all of them
              for me? Like: setrc apache2 0 0 1 1 1 1
	...
2009/10/27-11/3 [Computer/SW/Unix] UID:53475 Activity:nil
10/27   http://www.maxgames.com/play/flash-mind-reader.html
        how does this work?
        \_ sh -c 'for ((i=0;i<10;i++)); do for ((j=0;j<10;j++)); do echo "$i$j-(\
$i+$j)" | bc; done ; done' | uniq
        \_ bash -c 'for ((i=0;i<10;i++)); do for ((j=0;j<10;j++)); do echo "$i$j\
-($i+$j)" | bc; done ; done' | uniq
	...
2009/8/19-9/1 [Computer/SW/Unix] UID:53285 Activity:nil
8/18    Hi again, new freebsd guy here again, in bash I was able to go
        LD_LIBRARY_PATH=/opt/foo/lib ./runmyapp
        I managed to do this in tcsh by using setenv in a shell script
        that setenv's the lib path and then executes $1, just wondering
        if there was a way to do it in 1 line from the cmd line as in bash?
        Thanks, btw %2c or %3c worked.  Freebsd, tcsh and vi forever!
	...
2009/5/5-6 [Computer/HW/Laptop] UID:52950 Activity:moderate
5/5     Is there a good (or standard) way to make an offline copy of a w
        ordpress blog (mine, not someone else's)? tia.
        \_ oh man.
           \_ I could cobble something together with curl / wget, but I'd
              rather not if there is a standard way of doing this.  I'm
              pretty new to wordpress / blogging and I just want to keep
	...
2009/2/10-13 [Computer/SW/Security, Computer/SW/Unix] UID:52552 Activity:nil
2/10    I have an sh file that does a mount.. the mount does an
        authentication. I previosly stored the username and password
        from zenity prompts. However, I can't get a return on the password
        field. The following only works on the username:
        mount -t davfs "http://blahblah.com/BLahUser11" /mountdir << EOF
        ${username}
	...
2009/1/14-22 [Computer/SW/Languages/Perl, Computer/SW/Languages/Misc] UID:52378 Activity:nil
1/13    I want to extract a couple integer from an xml file, mainly,
        xml file from http://weather.com so I can put it on my xplanet marker
        file. has anyone done similar things (parse and extract data
        from xml) using shell script instead of python/perl?
        in the world of perl, it make sense to dump things into a hash
        which i can easily extract key/value pair.  can i achieve similar
	...
2008/12/18-2009/1/7 [Computer/SW/Mail] UID:52279 Activity:nil
12/18   Campus USENET service will be terminated on 12/31.
        http://ls.berkeley.edu/mail/micronet/2008/1608.html
        \_ I emailed RobR to tell him. -ausman
        \_ The CSUA is considering asking campus to allow us to run NNTP for
           ucb.class.*, as bSpace sucks major major ass. Thoughts? --t
           \_ That's noble, but maybe the effort would be better spent
	...
Cache (498 bytes)
www.ucarp.org
Jedi's weblog Blurb UCARP allows a couple of hosts to share common virtual IP addresses in order to provide automatic failover. It is a portable userland implementation of the secure and patent-free Common Address Redundancy Protocol (CARP, OpenBSD's alternative to the VRRP). Strong points of the CARP protocol are : very low overhead, cryptographically signed messages, interoperability between different operating systems and no need for any dedicated extra network link between redundant hosts.
Cache (358 bytes)
www.arachna.com/edu/talks/loadbalancing/slides/mod_rewrite_1_of_2.html
mod_rewrite One could have mod_proxy compiled in and dispense with the duplicate ProxyPass/ProxyPassReverse directives (necessitated by the way redirects are handled by ProxyPass). The P flag tells mod_rewrite to pass through the request. One can also use mod_rewrite to pass through requests to a multiplicity of back end but similarly functioning machines.
Cache (358 bytes)
tinyurl.com/4qzvt -> www.arachna.com/edu/talks/loadbalancing/slides/mod_rewrite_1_of_2.html
mod_rewrite One could have mod_proxy compiled in and dispense with the duplicate ProxyPass/ProxyPassReverse directives (necessitated by the way redirects are handled by ProxyPass). The P flag tells mod_rewrite to pass through the request. One can also use mod_rewrite to pass through requests to a multiplicity of back end but similarly functioning machines.