LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-12-2003, 03:15 AM   #1
freelinuxcpp
Member
 
Registered: Jul 2003
Posts: 129

Rep: Reputation: 15
how to route my lan ?


Hello everyboy
i have a lan with this config :
router-----firewall/gateway-----switch-----LAN
i have 2 NICs on my firewall/gateway
i did this steps :
1/ compil the kernel with the forwarding/netfilter options
2/ set ip_forward=yes
3/ set */ipv4/ip_forward to the 1 value
add my LANs machines name to /etc/hosts
i Set my 2 NICs addresse like this :
1 private IP 192.192.0.3 related to the router (because my lan is linked to an other lan and not to the internet )
1 private network 192.168.0.1 related to my private LAN
i set all machine gateway to 192.168.0.1 as default gateway

well all what i want to do is to be able to see my machines (LAN) from the other network (throught the wan) , and i want to know if all what i should do is to route
until now my network machines can ping my 2 firewall interfaces BUT CANT GO MORE AWAY !
i d like to know why
thanx
 
Old 11-12-2003, 12:53 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
The IPs between router and gateway should be on a differnet subnet to your lan - thiswill make routing easier.

You will also have to add some masquerading rules to your iptables rules. There are plenty of examples on this site.
 
Old 11-12-2003, 03:09 PM   #3
freelinuxcpp
Member
 
Registered: Jul 2003
Posts: 129

Original Poster
Rep: Reputation: 15
i dont wanna use masq cause i have to be able to see my machines from outside the network (it's 2 network in reality there is no access to the internet right now )
LAN2--Router=======router-----firewall/gateway-----switch-----LAN1
i have to be able to ping lan1 from lan 2 and the inverse !
 
Old 11-12-2003, 03:28 PM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Then you'll need to set up a VPN.

Take a look at this howto:
http://openvpn.sourceforge.net/bridge.html
 
Old 11-13-2003, 02:10 AM   #5
freelinuxcpp
Member
 
Registered: Jul 2003
Posts: 129

Original Poster
Rep: Reputation: 15
isn't there an other way ?
 
Old 11-13-2003, 08:58 AM   #6
zaphodiv
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 388

Rep: Reputation: 30
>i have to be able to ping lan1 from lan 2 and the inverse !

This could be made to work. You may need to do some configuration on the other lan as well.

Are things currently configured so that if you connect the router directly to the switch the two LAN's are linked? I assume not.

I assume that the 192.168.0.x block of addresses is not being used on the other lan. If you have a netmask of 255.255.255.0 then your machines will assume that other 192.168.0.x machines are local and will try to talk to them directly. Packets address to machines outside of 192.168.0.x will be sent to the default gateway.

As David_Ross says it will be easier if you have the two interfaces on the firewallbox in different subnets.
You need the PC's gateway set to the ip of that side of the firewall/gateway.

To do this without NAT/MASQ you then need the other lan configured correctly. The machines on the other lan need to have a route to send replys back to your machines. How to achieve that depends on how the other lan handles routing. You might need a default route to 192.168.0-1.x set on all the machines or you might have to do stuff with a routing protocol.
 
  


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
OpenVPN client cannot route to LAN TheAmazingSteve Linux - Networking 1 09-29-2005 03:40 PM
3 lan route urukhay Linux - Networking 1 11-08-2004 10:05 AM
route traffic onto the net from a lan gateway ulto Linux - Networking 1 04-13-2004 08:54 PM
Route a private LAN with 1 NIC freelinuxcpp Linux - Networking 4 11-01-2003 05:05 AM
route to alcatel modem/router: LAN & internet HerrBee Linux - Networking 0 06-11-2003 02:16 PM

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

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