Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


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

Rep: Reputation: 15
Routing between internal subnets

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

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

Eth0 address:
Eth1 address:

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 subnet to Is this correct?
3) How do I setup the workstations in the subnet? Do I set their network gateway to

Old 05-10-2005, 11:32 PM   #2
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...

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

Rep: Reputation: 32

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 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 problem at a time is enough !


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 03:30 PM
Firewall, Routing and Subnets - is this possible? donoss Linux - Networking 2 10-28-2004 01:34 PM
Internal Routing Saris Linux - Newbie 12 06-25-2003 12:30 AM
Routing between different subnets ... suvajit Linux - Networking 1 05-15-2003 08:07 AM
simple routing between subnets without NAT iggymac Linux - Newbie 2 03-24-2003 05:38 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:21 AM.

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