Category

network

  • 09.09.09
    IM from the command line network, shell | n0str0m0 | (0)
    % cd /usr/ports/net-im/finch; make install clean The above installs finch. It is an ncurses based instant messaging client, part of the pidgin suite. Though it can be a little tough at the beginning, it is a good alternative if you do not have a graphical interface. Below I show two screenshots. Use Alt-w to move between windows. Enjoy!
  • 06.29.09
    Measuring network performance network | n0str0m0 | (0)
    FreeBSD includes several benchmarking suites in the ports collection. One of these suites is netperf, developed by HP. It allows measuring several network parameters using two programs: the server and the client. First things first: let us install netperf. % cd /usr/ports/benchmarks/netperf && make install clean Once the software has been successfully compiled (it does not take long) we can bring the server up: $ netserver Starting netserver at port 12865 Starting netserver at hostname 0.0.0.0 port 12865 and family AF_UNSPEC Notice that you can launch the server as a regular user. Now, we are ready to run our test: $ netperf -t TCP_STREAM TCP STREAM TEST from ...
  • 04.22.09
    Need to know your public IP? network | rafacas | (0)
    Some times you may need to know your public IP address. With this simple command you can find it out: $ curl -s http://checkip.dyndns.org/ | egrep -o "[0-9.]+" There are some other sites where we can discover it like whatismyip or whatismyipaddress, but the user-agent needs to be spoofed beacuse they ban curl, so the solution is using the -A option: $ curl -A "Mozilla/4.0" -s http://whatismyip.com With the above command you will get the entire page bypassing the ban. But as the HTML of this pages is more complex and we do not want to fool them spoofing the user agent, we prefer ...
  • 04.20.09
    Monitoring HTTP requests from the command line network | rafacas | (0)
    Some days ago Javisantana sent me a tweet with a link to a one-liner HTTP requests monitor. It goes as follows with some ouput added: $ sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*" Password: tcpdump: listening on en1, link-type EN10MB (Ethernet), capture size 65535 bytes GET / HTTP/1.1 Host: commandliners.com GET / HTTP/1.1 Host: google.com GET / HTTP/1.1 Host: www.google.com GET / HTTP/1.1 Host: www.google.es GET /intl/en_com/images/logo_plain.png HTTP/1.1 Host: www.google.es [...] Replace en1 with your network interface's name. Usually enX in BSD-like OSes and ethX in Linux. You can create an alias named httpdump and add it to ~/.bash_profile: alias httpdump='sudo tcpdump -i en1 -n -s 0 -w ...
  • 04.17.09
    Showing a computer’s open ports cmd, network | rafacas | (0)
    $ netstat -an | grep -i listen Shows the open ports on all the IPs of the computer the command is run on.
  • 04.13.09
    OpenBSD’s pf null pointer dereference network, news, security | pfortuny | (0)
    We have talked quite a few times about pf, OpenBSD's Packet Filter (firewall). Well, a bug has been discovered which may trigger a kernel panic. There exists a solution, be sure to patch your boxes asap. Notice that the 'editing' solution works on all platforms and versions (at least from 4.2 upwards and probably on older ones).
  • 04.09.09
    ARP control and information network | n0str0m0 | (0)
    ARP is the protocol used to map IP to hardware addresses. This information is kept in a cache for some time (20 m. in the original implementation). The arp command can help you to know and control the ARP cache (This command is from a FreeBSD 7.1 box and it could differ in options or flags from your own version): $ arp -a www.brntech.com.tw (192.168.2.1) at 00:13:f7:96:53:02 on re0 [ethernet] Shows all the entries in the arp cache. In my case, I know of my router IP and hardware address. $ arp -i re0 -a The same as the previous one but limiting the scope to ...
  • 03.22.09
    RPM: listing files in installed packages cmd, network | rafacas | (0)
    # rpm -ql postgresql-libs /usr/lib/libecpg.so.6 /usr/lib/libecpg.so.6.0 /usr/lib/libecpg_compat.so.3 /usr/lib/libecpg_compat.so.3.0 /usr/lib/libpgtypes.so.3 /usr/lib/libpgtypes.so.3.0 /usr/lib/libpq.so.5 /usr/lib/libpq.so.5.1 [...] Lists all files of an installed package. It works only if the package is already installed on your system
  • 01.09.09
    Authpf: authenticated routing and firewalling on OpenBSD network, security, shell | pfortuny | (0)
    In our detailed description of OpenBSD's packet filter (here and there) we mentioned authpf, and spoke of it as a useful tool, but what is it use? I tend to understand it as an instrument for authenticated routing, that is, a way to provide routing (and firewalling etc...) services only to authenticated users. Think of a corporate setting with different users having access to different services according to their identities (and not according to their computer's IPs, which may well be dynamic or different). For example, user boss may access the firm's MAIN smb (ports 139, 435) server and any http ...
  • 12.22.08
    Disabling promiscuous mode on an interface cmd, network | rafacas | (0)
    # ifconfig eth0 -promisc Disables promiscous mode on the eth0 interface.