LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-27-2004, 03:42 AM   #1
Niblbit
LQ Newbie
 
Registered: May 2004
Location: Fairview, TN
Distribution: Slackware 9.1
Posts: 9

Rep: Reputation: 0
Choke Firewall


I have 2 boxes on a Linksys router connected to a nat'd westell adsl modem. One box runs win98(Inlaws) and my box runs Slack. My box is located in an apartment above our garage. Can't afford wireless right now but would like to add a server to our happy little family network. I don't want to put the server in my Inlaws house, I want it with me, upstairs. I'd like to put the server inbetween my linux box and the linksys. I've got the crossover cable for the link between my box and the server(and 2 nic's for the server).

A while back I went out and bought a great book called, "Linux Firewalls" by Robert Ziegler(New Riders). Great book btw if you wanna *buy* a book on Netfilter. The closest topology(in the book) that describes what I want is a choke firewall, if I'm not mistaken. The choke would be the server I'm wanting to add.

Now, my wan IP is not static but in your answers please assume that it is static to give me a better idea on how the routing is supposed to be set up. Here are some questions. They may be way off base.

1. In my Linksys you can add static routes by identifying: Dest. Lan IP, Subnet Mask, Default Gatway, No. of hops and whether the interface is for Lan or Wan. Please explain this. Does this mean I can add a route for the linux box *behind* the choke/server, if so, how are the above parameters setup?

2. I'm thinkin everything from the linux box needs to be forwarded through the choke/server to the router but how would the Wan side of the network be aware of the linux box w/o some sort of static routing in the Linksys? I can't offer any services because my wan IP is dynamic but if I do get an extra *static* IP in the future I'd like to know how all this is done.

3. Do I need to Subnet? I do understand the concept of subneting just unclear as to who gets the netmask. I know the host gets something like 255.255.255.128, right? K, both the win98 and the linux box?? I'm prob way off on needing this.

I'm sure I will have to do more reading and I'm not scared Just help me out with a few hints and maybe point me to some doc's or how-to's. I think I've got good handle on Netfilter but no expert by any means. So, throw some rules at me if you can get up to that point in this endeavor. Thanks a lot guys.
 
Old 05-27-2004, 06:41 PM   #2
Niblbit
LQ Newbie
 
Registered: May 2004
Location: Fairview, TN
Distribution: Slackware 9.1
Posts: 9

Original Poster
Rep: Reputation: 0
****BUMP****

Help a noob out please.
 
Old 05-27-2004, 07:08 PM   #3
dr0ker
Member
 
Registered: Aug 2003
Posts: 46

Rep: Reputation: 15
If all you are trying to accomplish is setting up a server then you could just get a cheap hub to connect your linux box and server to. The linksys router is most likely also a dhcp server for you, and subnetting isn't really something you need unless you are trying to go out of your way to make things interesting. The reason I suggest a cheap hub is that I am guessing you have one cable coming your apartment right now, and this one cable is connected to a port on the router somewhere down the line. The end of that cable could plug into a hub. A hub would allow you to plug both your server and slack box in and get internet access from the router, and the benefit of the router handing out df gw, mask, and ip. You can pick up hubs dirt cheap, but switches are just a tad more and ensure better performance. If you are determined to do it without a hub or switch can you try to explain the cabling config a bit more in detail?
 
Old 05-27-2004, 09:45 PM   #4
Niblbit
LQ Newbie
 
Registered: May 2004
Location: Fairview, TN
Distribution: Slackware 9.1
Posts: 9

Original Poster
Rep: Reputation: 0
Thanx for posting 1st off. Yes, you described my situation exactly. 100 ft. Cat cable up to the apartment from the router to my linux box. The win98 box is also linked to the router which is in my Inlaws house along w/ the Westell modem. The router is a Linksys BEFSR41, so, 2 out of 4 Lan ports are in use.

Yes, I thought about going with a switch but no, I do want to do it the hard/interesting way. I wanna learn. If you've got the time, please tell me how subnetting would be set up in my case. Also, the static routing question; will setting up a static route to my linux box via the server work or will ALL traffic headed for my network be sent to the server? If so, I could see how turning on forwarding in the server might be the solution. Any solutions you have to offer would be appreciated, whether I need to set up subnetting or not. Thanx again dr0ker.
 
Old 05-28-2004, 07:13 PM   #5
dr0ker
Member
 
Registered: Aug 2003
Posts: 46

Rep: Reputation: 15
Ok assuming your linksys router is setup like mine it is handing out 192.168.1.0/24 addresses. So on the side of the server talking to the router, you would need an address like 192.168.1.* that is static. Having it as static would make things easier when creating your rules in iptables. Then again I think you may be able to just refer to the interface eth0 or eth1 and be fine, so even if it changes iptables wouldn't care. The interface on side of the server that is directly connected to your Slack box could have something else like 192.168.2.*/24, so this would allow it to be on a different network segment. Your slack box would use an ip of 192.168.2.2 and it would have a default gateway of 192.168.2.1 assuming 192.168.2.1 is the ip of the nic the server has connected to the slack box.

Ok to sum it up server has 192.168.1.* on the side connected to the router. the server would use the routers IP as the default gateway. On the side of the server connected to the slack box it would have 192.168.2.1.

Your slack box would have an IP of 192.168.2.2 and use the servers 192.168.2.1 as the default gateway.

Basically you have network masks of 255.255.255.0 all the way around. A network mask of 255.255.255.0 means that the first 3 octets of the IP designate the network portion of the address and the octet of the address is the host portion.

Now one side of your server is on the network 192.168.1 while the other side is on the network 192.168.2.

You can now use forwarding on the server to give your slack box a net connection.
 
Old 05-31-2004, 10:46 PM   #6
Niblbit
LQ Newbie
 
Registered: May 2004
Location: Fairview, TN
Distribution: Slackware 9.1
Posts: 9

Original Poster
Rep: Reputation: 0
Thanx dr0ker, sry took so long to reply, had bad weather here past couple of days. Hadn't been on the computer. I'll try what you said and post back if I have any problems. Your instructions seem pretty straight forward, just use a different network for the slack box. Appreciate your help dr0ker.
 
  


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
BSD Firewall vs Linux Firewall ? rootlinux Linux - Security 5 08-29-2007 07:38 AM
Does XP Choke on ext3 Partitions? philipogletree Linux - Hardware 4 08-13-2005 01:04 AM
Network Choke, Timeouts? cdegroat Linux - General 2 04-19-2005 07:50 AM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
Firewall Builder sample firewall policy file ? (.xml) nuwanguy Linux - Networking 0 09-13-2003 12:32 PM

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

All times are GMT -5. The time now is 11:55 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