LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-18-2005, 12:44 PM   #1
Nauntilus
Member
 
Registered: Oct 2005
Distribution: All of them
Posts: 140

Rep: Reputation: 18
Qestion about Networking with a Firewall that has 2 ethernet cards


I just built a firewall using mandriva's multiple network firewall, version one, I have 2 ethernet cards in it and i am trying to make it dial into my DSL connection with one card and send the internet connection to the computers that are plugged into the other ethernet card. The other computers run through a d-link router, and the firewall is also connected to the d-link, but i dont know if there is something i am doing wrong? The router itself i dont know how to make that just act as a switch, but i have been working on this for 2 weeks and i have read the firewall documentation and everything, Any information is appreciated. Also i have the firewall to where it will connect to the internet, all that i am having a problem with is getting it to the point of where my other ethernet card is set to send information rather than retrieve it or however that works.
 
Old 11-18-2005, 03:45 PM   #2
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
if you aren't going to use the firewall function of the d-link then disable that in its configuration. if your linux box is going to serve dhcp then disable that in the d-link also, if you want the d-link to provide dhcp then keep it on. basically if you plug the output of your linux box into the main numbered ports on the d-link and the other computers on the network it will act as a switch. do not use the wan/dsl/cable/broadband port
 
Old 11-20-2005, 08:33 PM   #3
Nauntilus
Member
 
Registered: Oct 2005
Distribution: All of them
Posts: 140

Original Poster
Rep: Reputation: 18
Ok, I understand what you are saying, but how do i make my ethernet card an output instead of an input? I dont know how to do that.
 
Old 11-20-2005, 10:08 PM   #4
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
have you seen this:
http://www.linuxrouter.org/
 
Old 11-21-2005, 01:15 AM   #5
Nauntilus
Member
 
Registered: Oct 2005
Distribution: All of them
Posts: 140

Original Poster
Rep: Reputation: 18
Nooooooooo, ill check it out. Thanks
 
Old 11-21-2005, 01:22 AM   #6
Nauntilus
Member
 
Registered: Oct 2005
Distribution: All of them
Posts: 140

Original Poster
Rep: Reputation: 18
Yeah that doesnt help, I am looking for a way to do it throug mandrivas multi network firewall, not through another operating system. Anyways thanks for the URL, I am going to have to try that on one of my computers.
 
Old 11-21-2005, 03:22 AM   #7
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
this should do it
http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/
 
Old 11-22-2005, 03:18 PM   #8
Nauntilus
Member
 
Registered: Oct 2005
Distribution: All of them
Posts: 140

Original Poster
Rep: Reputation: 18
Ok so i see that may be what i have to do, i tried it though and my stupid firewall wont let me open it now, Where it asked for allowable ip addresses i put like 192.168.0.1/25 or something like that, Is this wrong?
 
Old 11-22-2005, 03:20 PM   #9
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
should be 192.168.0.0/24
 
Old 11-22-2005, 03:27 PM   #10
Nauntilus
Member
 
Registered: Oct 2005
Distribution: All of them
Posts: 140

Original Poster
Rep: Reputation: 18
Ok, Now yesterday night i got a new wireless router, it is a linksys, so do i make it 192.168.1.0/24 ???
 
Old 11-22-2005, 08:09 PM   #11
Finlay
Senior Member
 
Registered: Mar 2003
Location: Seattle
Distribution: Slackware ?-14.1
Posts: 1,029

Rep: Reputation: 47
if you allow connections from 192.168.0.0/24 that means any IPs that start with 192.168 will be accepted. the /24 just means you use a 255.255.255.0 subnet mask.
so you can set your router to any ip that starts with 192.168
but it can't end with a 0.
so set it to 192.168.0.,1 or 192.168.1.1
 
Old 11-22-2005, 08:33 PM   #12
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Going back to the top if you want to make the router just a switch you just plug all machines and lan side nic from firewall to the lan side of the router. If all lan machines are statically assigned then setup the router/switch lan side to use IP other than the lan machines and the lan nic IP from the linux firewall. Now point all lan machines to use the gateway to the lan side IP of the linux firewall.

Example
Wan x.x.x.x ( IP, Gateway, Subnet, DNS from provider)
Linux Firewall (Masquered)
Lan IP 192.168.0.1, subnet 255.255.255.0, No gateway defined

router lan side only connect lan from firewall and lan machines.
Set lan IP of router to say 192.168.0.100

Lan machine 1 IP 192.168.0.10, subnet 255.255.255.0, gateway 192.168.0.1, dns IP from provider.
Lan machine 2 IP 192.168.0.11, subnet 255.255.255.0, gateway 192.168.0.1, dns IP from provider.


Now using a wireless router should not be any different. Just lan IP again as 192.168.0.100 (This means not using the other router/switch). If wanting to use both use 192.168.0.101 ofr the other. The wan side of either does not matter. Only connect to lan side of the routers. Problalby need a crossover ethernet cable between both if used.

Just point all lan machine and wireless machine to gateway 192.168.0.1 Use any IP for 192.168.0.* from 2-254 excluding 100-101. like Finlay mentions. You cannot use 0. You cannot use 1since being used by the lan side of linux firewall. 100 and 101 is the lan IP of the router and wireless router if one or both used. 255 really should not because it is usually defined as the broadcast address but in full subnet its not that big of deal. Only when you use partial subnets does it help.

Hope this helps.
Brian1

Last edited by Brian1; 11-22-2005 at 08:41 PM.
 
Old 11-22-2005, 11:47 PM   #13
anuragsha
LQ Newbie
 
Registered: Nov 2005
Location: INDIA
Distribution: Fedora Core 4
Posts: 9

Rep: Reputation: 0
does this solve the problem
 
  


Reply



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
using 2 ethernet cards one Tx and one Rx kayser Linux - Networking 11 05-03-2004 02:03 PM
Noob Networking Qestion Verbal Kint Linux - Networking 5 04-08-2004 03:32 PM
two ethernet cards Canadian_2k2 Linux - Networking 4 12-07-2003 10:58 PM
DHCP/Samba networking with two ethernet cards GreenerLinux Libranet 10 10-24-2003 09:55 PM
Ethernet Cards and Sound Cards SchizoIV Linux - Newbie 2 07-05-2002 09:10 PM

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

All times are GMT -5. The time now is 05:48 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
Open Source Consulting | Domain Registration