Vin
Vin

Reputation: 727

Problems compiling iptables on mac

I am trying to install snort on my mac and while compiling it, it shows a lot of errors about other libraries which it needs - like libnet, libpcre, iptables etc. I have compiled libnet , libpcre successfully. But when I downloaded iptables , I get a lot of compilation errors like :

In file included from ../include/xtables.h:17, from libxt_AUDIT.c:10: ../include/linux/types.h:27: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘le16’ ../include/linux/types.h:28: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘_attribute’ before ‘be16’ ../include/linux/types.h:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘_attribute’ before ‘le32’ ../include/linux/types.h:30: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘_attribute’ before ‘_be32’

How do I resolve them ? DO I need kernel-headers package or something ? Or should this all be done only on Linux and am I wasting my time getting it to work on Mac ?

Upvotes: 0

Views: 1838

Answers (1)

user862787
user862787

Reputation:

According to the Snort requirements page, Snort requires libpcap (which comes as a standard part of Mac OS X), PCRE (which builds and installs on Mac OS X), Libdnet (the home page for which claims it supports Mac OS X), Barnyard2 (the home page for which implies it supports Mac OS X by mentioning a plist file for Mac OS X Server), and DAQ (which is part of Snort; dunno whether it supports OS X or not).

It doesn't mention iptables as a requirement. This is not surprising, as iptables is a Linux-specific mechanism, and Snort is not a Linux-specific program.

There appear to be some extensions to Snort that can use iptables on Linux. There are other mechanisms similar to iptables, such as ipfilter, ipfw, and PF. Prior to Mac OS X Lion, Mac OS X used ipfw; in Lion, it uses PF. It might be possible to do whatever you want to do on Mac OS X if the mechanism you're trying to use can use ipfw or PF in addition to using iptables.

Upvotes: 1

Related Questions