Skip to contentSkip to conversation

NetBIOS browsing across subnets

DISCUSSION John Jones 6 participants 7 messages Jul 4, 2002 – Jul 5, 2002

lore
Share & tools
lore

John Jones

author
#0 lore raw

I have a need to allow NetBIOS/Network Neighborhood browsing across a firewall between one internal LAN segment (192.168.0.0/23) to another (192.168.10.0/24). The two networks are on interfaces eth2 and eth3, respectively, off of the corporate firewall.

The two segments of the LAN were seperated due to broadcast flooding during video streaming development work by a dev team.

I have the majority of the instructions down, I *think*:

iptables -t nat -I PREROUTING 1 -i eth2 -p tcp -d 192.168.0.1 --dport
139 -j DNAT --to 192.168.10.1:139
iptables -I FORWARD 6 -i eth2 -o eth3 -p tcp -d 192.168.10.1 --dport
139 -j ACCEPT

iptables -t nat -I PREROUTING 1 -i eth3 -p tcp -d 192.168.10.1
--dport 139 -j DNAT --to 192.168.0.1:139
iptables -I FORWARD 6 -i eth2 -o eth2 -p tcp -d 192.168.0.1 --dport
139 -j ACCEPT

Not sure if this should be Destination NAT or Source NAT. I would like advice and/or corrections from anyone out there that has a better knowledge of this, first.

Thanks in advance.

#1 lore raw
Quoted 4 lines · John Jones

I have a need to allow NetBIOS/Network Neighborhood browsing across a firewall between one internal LAN segment (192.168.0.0/23) to another (192.168.10.0/24). The two networks are on interfaces eth2 and eth3, respectively, off of the corporate firewall.

As far as I am aware you cannot do Network Neighbourhood browsing across a router - it works by using broadcast packets, so unless you bridge your networks together you will not be able to browse one side from the other.

You can certainly make Windows / SMB / NetBios connections from one network to another, but only if you know in advance the IP address/es of the machine/s you want to connect to.

If anyone knows a way of supporting Windows browsing across a router, please speak up :-)

Antony.

#2 lore raw

Antony:

This subject came up on the list previously. There was a link
to a Microsoft Article addressing it. Perhaps if he looked through the archives he might find it.

Stu......

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Antony Stone
Sent: July 4, 2002 1:46 PM
To: [email protected]
Subject: Re: NetBIOS browsing across subnets

Quoted 4 lines · John Jones

I have a need to allow NetBIOS/Network Neighborhood browsing across a firewall between one internal LAN segment (192.168.0.0/23) to another (192.168.10.0/24). The two networks are on interfaces eth2 and eth3, respectively, off of the corporate firewall.

As far as I am aware you cannot do Network Neighbourhood browsing across a router - it works by using broadcast packets, so unless you bridge your networks together you will not be able to browse one side from the other.

You can certainly make Windows / SMB / NetBios connections from one network to another, but only if you know in advance the IP address/es of the machine/s you want to connect to.

If anyone knows a way of supporting Windows browsing across a router, please speak up :-)

Antony.

#3 lore raw
In reply to Antony Stone
Quoted 4 lines · you

If anyone knows a way of supporting Windows browsing across a router, please speak up :-)

Netbios will not pass a router. The only way to allow this type of browsing is to use a WINS Server. There is a way to set up either a push or pull mechanism to share info between different netbios 'zones'. (although it's been a few years since I had no other choice than windows networking and don't remember the specifics)

Ron

#6 lore raw

Suppose you have two subnets 192.168.1.0/24 and 192.168.2.0/24 joined by a netfilter router, and you want to browse Windows NetBios shares on the 192.168.2.0 subnet from a client machine on the 192.168.1.0 subnet.

Suppose you put the following rules on the router:

iptables -A PREROUTING -t nat -d 192.168.1.255 -j DNAT --to 192.168.2.255

iptables -A FORWARD -j ACCEPT

Would this forward a broadcast packet on the 192.168.1.0 network to the
192.168.2.0 network ? Presumably the reply to such a broadcast is sent back
to the originating IP, so that would go back across the router perfectly okay.

If you needed to transfer broadcasts from both networks to each other you'd have to be a bit clever with the iptables rules, so as not to translate a packet and then immediately translate it straight back again, but it could still be done.

Unfortunately amongst all my Linux machines I don't have enough Windows
computers here to try this idea out :-) Maybe someone else can comment on
it from experience, or try and tell us what happens ?

Antony.