Hi, I am trying to have some routing done between two subnets. One is 192.168.1.0/24 and has my LAN computers running a mix of Windows 98/XP clients. There are two linux machines on this network running Samba. Another is 192.168.0.0/24 and has the other LAN. Only my linux machines have two NICs, one for each LAN. I am trying out one of these linux machines to be the gateway for both the LANs. My routing table is as follows Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1 0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0 At present, I am testing my system, so I have adopted a VERY liberal iptables ruleset. It has the following entries #! /bin/sh # # definitions IPTABLES=/sbin/iptables DEPMOD=/sbin/depmod MODPROBE=/sbin/modprobe EXTIF="eth1" INTIF="eth0" UNIVERSE=0.0.0.0/0 # # Load modules $DEPMOD -a $MODPROBE ip_tables $MODPROBE ip_conntrack $MODPROBE ip_conntrack_ftp $MODPROBE ip_conntrack_irc $MODPROBE iptable_nat $MODPROBE ip_nat_ftp $MODPROBE ip_nat_irc # # Enable IP forwarding echo "1" > /proc/sys/net/ipv4/ip_forward # # Begin iptables rules $IPTABLES -P INPUT ACCEPT $IPTABLES -F INPUT $IPTABLES -P OUTPUT ACCEPT $IPTABLES -F OUTPUT $IPTABLES -P FORWARD ACCEPT $IPTABLES -F FORWARD $IPTABLES -t nat -F #$IPTABLES -A INPUT -j ACCEPT #$IPTABLES -A OUTPUT -j ACCEPT #$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT #$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT #$IPTABLES -A FORWARD -j LOG $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE $IPTABLES -t nat -A POSTROUTING -o $INTIF -j MASQUERADE With this setup, some things work as desired. I am able to connect to 192.168.0.10 (Email server) from 192.168.1.5 after setting my linux box as the gateway. Vice versa, I am able to connect to 192.168.1.6 (Email server) from 192.168.0.2 by setting 192.168.0.177 (my linux box's IP on outside LAN). I am beginning to think so far so good. But, Windows networking does not follow suit. I am not able to browse the network when these settings are active. What gives? My guess is I will be castigated for rushing with an email before reading the Archives. But hope springs eternal. Regards, Nandan
> With this setup, some things work as desired. I am able to connect to > 192.168.0.10 (Email server) from 192.168.1.5 after setting my linux box > as the gateway. Vice versa, I am able to connect to 192.168.1.6 (Email > server) from 192.168.0.2 by setting 192.168.0.177 (my linux box's IP on > outside LAN). > > I am beginning to think so far so good. But, Windows networking does > not follow suit. I am not able to browse the network when these settings > are active. > > What gives? My guess is I will be castigated for rushing with an email > before reading the Archives. > > But hope springs eternal. Regards, > > NandanCan you browse to \\ip.of.samba.box and see the shares?> > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/listinfo/samba
Hi Nathan> > Thanks for your interest. In reply to your question, the answer is > yes. Both the linux machines are on both the LANs. Both are browseable > from Windows clients in both networks by \\netbiosname and \\ipaddressTo confirm, You can connect across these subnets with netbios or ip, but only browsing through "My Network Places" does not work? and the only shares you are trying to browse for are the samba shares on your linux box? if not do the windows based shares show? Have you set the workgroup in the samba config? or are you choosing 'View Entire Network' when browsing through My network places?> . > > My intent is to have a client from 192.168.1.0/24 to browse > 192.168.1.0/24 windows network (and vice versa) using my linux box as > gateway. Is this possible?This might interest you, I'm not sure how old it is. http://brneurosci.org/linuxsetup38.html> I'm also not sure if this is an iptables problem or a samba problem. > > Thanks, > > NandanRegards, Mark> > > On 4/11/07, Mark Adams <mark@campbell-lange.net> wrote: > >> With this setup, some things work as desired. I am able to connect to > >> 192.168.0.10 (Email server) from 192.168.1.5 after setting my linux box > >> as the gateway. Vice versa, I am able to connect to 192.168.1.6 (Email > >> server) from 192.168.0.2 by setting 192.168.0.177 (my linux box's IP on > >> outside LAN). > >> > >> I am beginning to think so far so good. But, Windows networking does > >> not follow suit. I am not able to browse the network when these settings > >> are active. > >> > >> What gives? My guess is I will be castigated for rushing with an email > >> before reading the Archives. > >> > >> But hope springs eternal. Regards, > >> > >> Nandan > > > >Can you browse to \\ip.of.samba.box and see the shares? > > > >> > >> -- > >> To unsubscribe from this list go to the following URL and read the > >> instructions: https://lists.samba.org/mailman/listinfo/samba > > > > > -- > Nandan Bhat > 403 Kasturi Towers > L.B.S. Marg, Naupada, > Thane 400601 INDIA
On Thu, Apr 12, 2007 at 11:58:48AM +0530, Nandan Bhat wrote:> Hi Mark, >Hi Nandan,> Thanks for the link; I'll try it out and let you know how it goes. > > As for my LANs, my situation is this: > * my linux machines are on both LANs > * both linux machines are part of the 192.168.1.0/24 workgroup and > appear under the workgroup when viewed from Windows clients in > 192.168.1.0/24 > ** under 192.168.1.0/24, all windows clients are able to browse the two > linux boxes and machines under 192.168.1.0/24 but not machines under > 192.168.0.0/24 > * both linux machines appear under a workgroup when viewed from Windows > clients in 192.168.0.0/24 (and are browseable). > ** under 192.168.0.0/24, all windows clients are able to browse the two > linux boxes and machines under 192.168.0.0/24 but not machines under > 192.168.1.0/24 >It sounds like Samba is working as desired. To have netbios work for the windows machines across the subnets I believe you will have to have the WINS server as detailed in that old (2005) link I posted. I have never set this up personally so can not help you on that any further. Personally, I would instead use DNS. do you have a DNS server on one of the linux boxes (such as dnsmasq?) if you set up dns and DHCP from the linux box, then your windows clients will most likely browse across fine as long as they are getting their dhcp lease from this box (make sure you turn off any adsl/firewall/router dhcp setup). Regards, Mark> I'll try out the suggestions in the link and let you know how it goes. > BTW, I am guessing only one of my linux machines needs to be the local > master; the other may be a domain master (but need not be). Correct me > if I'm wrong on that concept. > > Thanks, > > Nandan > > > Mark Adams wrote: > >Hi Nathan > > > > > >>Thanks for your interest. In reply to your question, the answer is > >>yes. Both the linux machines are on both the LANs. Both are browseable > >>from Windows clients in both networks by \\netbiosname and \\ipaddress > >> > > > >To confirm, You can connect across these subnets with netbios or ip, but > >only browsing through "My Network Places" does not work? and the only > >shares you are trying to browse for are the samba shares on your linux > >box? if not do the windows based shares show? > > > >Have you set the workgroup in the samba config? or are you choosing > >'View Entire Network' when browsing through My network places? > > > >