Skip to contentSkip to conversation

: Add NetBIOS name service helper

RFC In review Patrick McHardy 2 participants 3 messages Sep 4, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 2/2 : Add NetBIOS name service helper

[NETFILTER]: Add NetBIOS name service helper

---
commit 0d787bce27efe5d9bf8bf71cf331034ec80a24d1
tree 0fe083c63885cb14edab4891b842c38ee183095a
parent bd8f79e9d585ff9022850cadc5a1e6b81b8bafda
author Patrick McHardy <[email protected]> Sun, 04 Sep 2005 06:11:39 +0200 committer Patrick McHardy <[email protected]> Sun, 04 Sep 2005 06:11:39 +0200

 net/ipv4/netfilter/Kconfig                   |   19 ++++
 net/ipv4/netfilter/Makefile                  |    1 
 net/ipv4/netfilter/ip_conntrack_netbios_ns.c |  131 ++++++++++++++++++++++++++
 3 files changed, 151 insertions(+), 0 deletions(-)
net/ipv4/netfilter/Kconfig +19 -0
@@ -85,6 +85,25 @@ config IP_NF_IRC
 
 	  To compile it as a module, choose M here.  If unsure, say Y.
 
+config IP_NF_NETBIOS_NS
+	tristate "NetBIOS name service protocol support (EXPERIMENTAL)"
+	depends on IP_NF_CONNTRACK && EXPERIMENTAL
+	help
+	  NetBIOS name service requests are sent as broadcast message from an
+	  unpriviledged port and responded to with unicast messages to the
+	  same port. This make them hard to firewall properly because connection
+	  tracking doesn't deal with broadcasts. This helper tracks locally
+	  originating NetBIOS name service requests and the corresponding
+	  responses. It relies on correct IP address configuration, specifically
+	  netmask and broadcast address. When properly configured, the output
+	  of "ip address show" should look similar to this:
+
+	  $ ip -4 address show eth0
+	  4: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
+	      inet 172.16.2.252/24 brd 172.16.2.255 scope global eth0
+	  
+	  To compile it as a module, choose M here.  If unsure, say N.
+
 config IP_NF_TFTP
 	tristate "TFTP protocol support"
 	depends on IP_NF_CONNTRACK
net/ipv4/netfilter/Makefile +1 -0
@@ -21,6 +21,7 @@ obj-$(CONFIG_IP_NF_AMANDA) += ip_conntra
 obj-$(CONFIG_IP_NF_TFTP) += ip_conntrack_tftp.o
 obj-$(CONFIG_IP_NF_FTP) += ip_conntrack_ftp.o
 obj-$(CONFIG_IP_NF_IRC) += ip_conntrack_irc.o
+obj-$(CONFIG_IP_NF_NETBIOS_NS) += ip_conntrack_netbios_ns.o
 
 # NAT helpers 
 obj-$(CONFIG_IP_NF_NAT_AMANDA) += ip_nat_amanda.o
net/ipv4/netfilter/ip_conntrack_netbios_ns.c new file +131 -0

131 lines not on this page · raw message

#1 lore raw

net/ipv4/netfilter/Kconfig config IP_NF_IRC · line 92

Quoted 1 line · Patrick McHardy
net/ipv4/netfilter/Kconfig +1 -0
+	  NetBIOS name service requests are sent as broadcast message from an

+ NetBIOS name service requests are sent as broadcast messages from an

net/ipv4/netfilter/Kconfig config IP_NF_IRC · line 93

Quoted 1 line
net/ipv4/netfilter/Kconfig +1 -0
+	  unpriviledged port and responded to with unicast messages to the

+ unprivileged port and responded to with unicast messages to the

Quoted 1 line

+ * requests by issueing permanent expectations (valid until

+ * requests by issuing permanent expectations (valid until

Quoted 1 line

+ * timeing out) matching all reply connections from the

+ * timing out) matching all reply connections from the

Phil

#2 lore raw
Quoted 12 lines · Phil Oester

net/ipv4/netfilter/Kconfig config IP_NF_IRC · line 92

Quoted 1 line · Patrick McHardy
net/ipv4/netfilter/Kconfig +1 -0
+	  NetBIOS name service requests are sent as broadcast message from an

+ NetBIOS name service requests are sent as broadcast messages from an

net/ipv4/netfilter/Kconfig config IP_NF_IRC · line 93

Quoted 1 line
net/ipv4/netfilter/Kconfig +1 -0
+	  unpriviledged port and responded to with unicast messages to the

+ unprivileged port and responded to with unicast messages to the

Quoted 8 lines
Quoted 1 line

+ * requests by issueing permanent expectations (valid until

+ * requests by issuing permanent expectations (valid until

Quoted 1 line

+ * timeing out) matching all reply connections from the

+ * timing out) matching all reply connections from the

Fixed, thanks Phil.