LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-10-2005, 10:17 PM   #1
teamchachi
LQ Newbie
 
Registered: Mar 2005
Location: Calgary Alberta Canada
Posts: 22

Rep: Reputation: 15
Routing between internal subnets


My main subnet (192.168.10.0) contains all of my servers and the majority of my windows desktops. I want to create a second subnet (192.168.20.0) for some Windows desktops that I want to control access to. Basically I want to be able to restrict which 192.168.10.0 Windows desktops can access the 192.168.20.0 subnet.

I'm hoping to setup a fairly minimal linux machine with two NICs in order to route traffic between the subnets.

Eth0 address: 192.168.10.254
Eth1 address: 192.168.20.1

A few questions:
1) How do I go about getting traffic to route across the two NICs? I'm assuming that I need to write an IPTABLES rule to reject the IPs that I'm attempting to block.
2) I think that I need to setup a static route on my firewall (m0n0wall) to route traffic bound for 192.168.20.0 subnet to 192.168.10.254? Is this correct?
3) How do I setup the workstations in the 192.168.20.0 subnet? Do I set their network gateway to 192.168.20.1?

Thanks!
 
Old 05-10-2005, 10:32 PM   #2
teamchachi
LQ Newbie
 
Registered: Mar 2005
Location: Calgary Alberta Canada
Posts: 22

Original Poster
Rep: Reputation: 15
Okay, I've figured out the answer to question one. Looks like I need to turn on IP forwarding.

However, I'm still in the dark on questions 2 and 3...

Thanks
 
Old 05-11-2005, 07:21 AM   #3
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi

Quesiton 2 :
When you configure an interface, the corresponding static route is automatically added to the routing table, so you've got nothing to do, except adding a default route to your Internet gateway if your PC need to go on Internet.

Question 3 :
Indeed, the gateway is the destination IP used for every packet that is not on your LAN. It must be 192.168.20.1 since it's the only link between your two subnets that is on the same LAN as your workstations

Rk : Before using iptables, just make it work... default iptables behaviour is to accept every packet, so configure the routing and the gateways, make it work, and then only restrict accesses through iptables...one problem at a time is enough !
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing on my internal network. Milkman00 Linux - Networking 11 09-02-2005 02:30 PM
Firewall, Routing and Subnets - is this possible? donoss Linux - Networking 2 10-28-2004 12:34 PM
Internal Routing Saris Linux - Newbie 12 06-24-2003 11:30 PM
Routing between different subnets ... suvajit Linux - Networking 1 05-15-2003 07:07 AM
simple routing between subnets without NAT iggymac Linux - Newbie 2 03-24-2003 04:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration