Jump to content

routing help needed? (I think)


inigo2
 Share

Recommended Posts

I have my linux machine on a wireless network (wlan0), which connects to the internet. I have eth0 going to a switch, which connects to a windows box. I have internet sharing done and working (thanks in part to the people here :), and I have samba working. My question is this: the wireless network is 192.168.0.*; the local (eth0) network is 192.168.1.*; is there any way to get the windows machine visible to all the other machines on the wireless network over samba? Currently the windows machine can just see the linux machine, and the linux machine is the only thing that can see that windows machine. Does this involve simply routing packets differently? Something with iptables? Or do I have to get bridging working?

 

Thanks for your time, and please let me know if that didn't make sense...

 

-dan

Link to comment
Share on other sites

are you able to draw out what your saying and how it is connected.. i know what your saying but if you drew me a little diag i would be able to answer with the correct information...

Link to comment
Share on other sites

You have two choices anyway!!!

 

Firstly you can put wlan0 and eth0 into the same subnet (unless I missed something)

i.e. Change the Wlan IP range into 192.168.1.x/255.255.255.0

Like inigo says a diagram would sure help :D

 

For me I have my wireless access point just acting as an access point, it gets its IP from the DHCP server and the wireless connects through it to the DHCP server.

In effect the wireless access point is simply acting as a hub....

 

You can route between the two networks but for what I imagine you are doing its overcomplex and unneeded (probably)

 

Its really hard to actually describe without a few piccy's.... I know...

 

#192.168.0.255_WIRELESS POINT_WLAN0-ETH0_192.168.1.255_WIREDHUB->WIN

#|__DSL/CABLE MODEM_____DHCP FROM ISP____ISP

 

 

Does that describe your current setup ????

 

How about

# ______________WIN PC'S

# |

#_____ISP__DSL/CABLE_SWITCH__ETH0___----WLAN0__________

# |______________WIRELESS_POINT__|

#

 

 

BAH, the ASCII ART STUFF GETS SCREWED BY THE FORMATING

 

What Im suggesting is that you don't need seperate networks/subnets

Im presuming the wireless is optional for the linux machine.....

That is you can/want to connect via both!!!

Link to comment
Share on other sites

Yeah, trying to diagram this stuff without an actual picture is a pain... So, I tried to draw a picture (hopefully it comes through alright; and please ignore the fact I spelled "wireless" wrong, I was in a rush :) UPDATE: I don't seem to be able to attach the picture; I can't access my webspace from work, so I'll upload it when I get home.

 

So, to describe the picture, in case it doesn't work:

3rd floor (roommate's room): DSL modem, connects to wireless router, which is 192.168.0.1.

 

1st floor (my room): linux machine, with a usb wireless card connected to the router (192.168.0.169, static), and a wired card (eth0, 192.168.1.1) connected to a linksys switch. Connected to the switch is a windows2000 machine (192.168.0.253, via dhcp from the linux machine).

 

I could always go out and get another wireless card for the windows box, but I'm just trying to avoid buying more stuff, if I can avoid it.

 

Forcing eth0 to a 192.168.0.x address, and having it send a 192.168.0.x address to the windows machine, would that work? Or would it just screw things up?

 

Hopefully this makes more sense...thanks a lot for your time..

-dan

post-14-1075305160.jpg

Link to comment
Share on other sites

It can work but it involves splitting the Class C network in half with netmasks. This isn't any easier than routing across two different CLass C's so no real advantage. (in fact its a bit messier IMHO)

 

The easiest goes back to your original question, now we have the diagram its much easier :D

 

So I'd probably just install a firewall like shorewall and use it to route IP tables....

The 192.168.0.x addresses are a bit dodgy though.... they kinda mess up the netmasks and broadcasts.... (or at least my understanding of them - youll see what I mean when you start setting up your firewall rules :D)

In practice I'd choose a different Class C altogether...

Why not use the 192.168.1x class for the wireless and 172.16.1 class for the wired. That way it will be obvious when you define the IPTABLES rules....

Link to comment
Share on other sites

I should be able to change to those IP ranges for the wireless and the wired. I believe I have shorewall installed (I think with 9.2 it gets installed automatically when you do internet connection sharing? Could be wrong..)

 

So, now it's time to get started with iptables, eh? I just read (well, to the extent that I could understand) the man page....should be interesting. Later tonight I'm going to try to find some stuff more my speed about iptables, to try to understand it better...

 

Thanks!

Link to comment
Share on other sites

Oh, forget about IP tables for now!!!

Well not forget but its pretty messy hacking them by hand :D

You need to understand what they do and stuff but the niceties are what I'd call an advanced topic....

 

Do yourself a enormous favour!!!

Go to the shorewall site and download their configuration files, they have a special section for Mandrake users becuase the Mandrake implementation is 'weird' to say the least.

 

There are 'quickstart' configurations for three different situations (depending how you want to use it) and the accompanying documentation is REALLY GOOD. It explains the basics of IPTABLES at the same time. They make abolutely NO SENSE whatsoever with the Mandrake config until you actually get them working....

Like I said its not actually that hard, just confusing....

(for instance there is no reason NOT to use the 192.168.0.x IP range except its confusing - youll see why when you start configuring)

 

Once you understand shorewall and IP tables the Mandrake config makes sense but it just doesn't correspond with the guides :D

 

Once you install it Webmin is a real easy way to configure shorewall....

Link to comment
Share on other sites

Alright, sorry for the slow response but it's been a busy few days... I've been using the Shorewall documentation to try to get things working, but haven't quite had success yet. I found http://shorewall.net/samba.htm (and the other tutorials on the shorewall site) pretty helpful. Question: "To make network browsing (“Network Neighborhood”) work properly between Z1 and Z2 requires a Windows Domain Controller and/or a WINS server." So I should install a WINS server on the linux machine?

Hopefully I have to try to work through this tonight..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...