Saturday, July 30, 2005

 

Open up that firewall

Here's a "trick" from a unix novice. There is probably a better way to do this, but...

I have giFT (Poisoned is a front-end to giFT, so this will also work with Poisoned) running on my Mac, and it opens several different ports to listen. I wanted to make sure I had all of the ports opened up on the firewall, so first I fired up the terminal and typed:

netstat -an | grep LISTEN > before.txt

This dumps a list of all the ports that are currently listening (waiting for a connection) to the file called "before".

Now I start giFT:

giftd -d

Next I repeat the command that I used above, to see what new ports giFT has opened:

netstat -an | grep LISTEN > after.txt

You can either open both of these files and compare them manually, or use the diff utility:

diff before.txt after.txt

In my case (because I'm anal), I then went through and made sure that each of the ports was something that I actually wanted exposed to the internet - in this case there was one port (1213) that giFT uses for the GUI, so I chose to keep that closed. All of the others I opened up on the firewall.

This will work with any application - I'm just using giFT as an example.


Friday, July 29, 2005

 

Compiling Glitter on Mac OS X

Glitter is a usenet (newsgroups, NNTP, etc.) binary downloader. It seems to be just a front-end to aub and cron. I'm not really sure if it is what I am looking for.

Anyway, it wouldn't initially compile on Mac OS X. Here is the error:

nntp.c: In function `open_socket':
nntp.c:33: error: storage size of `servaddr' isn't known
nntp.c:60: error: invalid application of `sizeof' to an incomplete type
nntp.c:33: warning: unused variable `servaddr'
make[3]: *** [nntp.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2


And the very simple fix is to look in nntp.c for the line that says:

#include <arpa/inet.h>

and add:

#include <tcpd.h>

I found a similar hint here.

Incidentally, what I am looking for is a newsreader that will not choke too badly on the thousands of posts that typically make up a binary news group. Ideally, it would recognize the common naming conventions used on usenet and thread everything for me - not just the typical thread-by-subject view. I don't even care if it will do the downloads for me... that is what I have nget for, and it is available through fink.

This page is powered by Blogger. Isn't yours?