Berkeley CSUA MOTD:Entry 35459
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2018/04/26 [General] UID:1000 Activity:popular
4/26    

2004/12/28-29 [Computer/Networking] UID:35459 Activity:low
12/28   How can I find out the IP addresses of the machine that a program is
        running on? I know one way is just to gethostname() and then do a
        gethostbyname() on that. But that relies on the resolver. Ideally,
        I'd like to do it the way 'ifconfig' does it (which AFAICT doesn't
        rely on the resolver), but I haven't been able to track down yet
        exactly how it does it. Thanks.
        \_ It reads /proc/net in Linux. Probably does something similar
           in *NIX/*BSD you use. -williamc
        \_ then read ifconfig source.  /usr/src/sbin/ifconfig/
        \_ why not just fork off an 'ifconfig -a' and parse through its output?
           And assuming that a machine has just one IP address is not a good
           assumption to make...
2018/04/26 [General] UID:1000 Activity:popular
4/26    

You may also be interested in these entries...
2013/12/28 [Computer/SW/Security] UID:54760 Activity:nil
12/28   Happy holidays everyone.
        For some reason my work's ip address gets logged in /etc/hosts.deny and\
I cannot ssh in anymore from work
        (except from home where I can ssh in fine): anyone knows if this file is\
 auto-generated due to some event? Thanks
	...
2009/12/3-26 [Computer/Companies/Google] UID:53563 Activity:nil
12/2    Google launches its own DNS. Google Public DNS:
        http://code.google.com/speed/public-dns
        8.8.8.8 and 8.8.4.4
        Kick ass!
        \_ http://radoff.com/blog/2009/12/07/google-dns-benchmarking-and-rationale
        \_ I get 1.7ms pings to 4.2.2.2 and 23ms pings to 8.8.8.8.
	...
2009/11/4-17 [Computer/Networking, Computer/SW/Security, Computer/SW/P2P] 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/12/15 [Computer/Companies/Ebay] UID:52251 Activity:moderate
12/14   Got really screwed by this eBay buyer (says he'll pay, then
        waits, then says he'll pay by check, then makes up a story,
        then at the end says you're rude and doesn't want to pay
        anymore). eBay refuses to do anything about it. WTF? What
        is the best way to get back at this guy?
        \_ That's hardly "really screwed."  You still have the item, right.
	...
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.
	...
2008/7/14-16 [Computer/SW/Languages/Perl, Computer/SW/Unix] UID:50557 Activity:moderate
7/14    Shell Programming question: I want to call a script with 1 arg
        and have it figure out whether $1 is a MAC address or an IP address
        and then do call the appropriate function.  What is the best way
        to do this, given that sh/bash/ksh do not have something like
        the =~ in perl.  Check for exit status of grep, or is there a
        a better way?  For the moment, let's just say the two tests are:
	...