LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-10-2005, 12:09 AM   #1
Dasha
LQ Newbie
 
Registered: Apr 2004
Distribution: Redhat 9.0
Posts: 19

Rep: Reputation: 0
Routing...........


Hi,

Need some help.........

I have a Core 3 machine set up with 2 nics. I want to set it up as a router between 2 networks. I've set up a squid on that machine for internet and also have Firestarter set up for ipforwarding.

I have networks 192.168.8.0 and 192.168.1.0. I can get it to work one way by setting the gateways appropriately.....ie. can ping 192.168.1.0 from 192.168.8.0 but can't ping 168.8. from 168.1. network.

Any ideas would be most helpful.

Thanx.
 
Old 05-10-2005, 01:11 AM   #2
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
I'm not sure what rules Firestarter uses for forwarding, type the parts in bold into the terminal and post the results here, mine are included as a reference. Also I assume that your networks are getting IP addresses from this FC3 machine; if they aren't forget the last part about dhcpd.

This will tell us what rules the firewall is using to marshall traffic between your interfaces:
Code:
root@gateway:~# iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 34740 packets, 11M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 78 packets, 5107 bytes)
 pkts bytes target     prot opt in     out     source               destination
 1300 79005 MASQUERADE  all  --  any    eth0    anywhere             anywhere

Chain OUTPUT (policy ACCEPT 1156 packets, 70442 bytes)
 pkts bytes target     prot opt in     out     source               destination
This will tell us if ip_forwarding is enabled properly:
Code:
root@gateway:~# cat /proc/sys/net/ipv4/ip_forward
1
This will tell us how your dhcp server is handing out addresses.
Code:
root@gateway:~# cat /etc/dhcpd.conf
subnet 192.168.1.0 netmask 255.255.255.0 {
        option routers 192.168.1.1;
        option domain-name-servers 206.47.244.12, 206.47.244.42;
        option ip-forwarding on;
        range 192.168.1.100 192.168.1.254;
}
 
Old 05-10-2005, 02:48 AM   #3
Dasha
LQ Newbie
 
Registered: Apr 2004
Distribution: Redhat 9.0
Posts: 19

Original Poster
Rep: Reputation: 0
Hi, thanx for your reply..........here is the output. No DHCP, all my machines are static.
Note I have VPN and VNC forwarded to other machines.
Cheers.

[root@ ~]# iptables -t nat -L -v
Chain PREROUTING (policy ACCEPT 106 packets, 4353 bytes)
pkts bytes target prot opt in out source
destination
0 0 DNAT tcp -- eth0 any anywhere
anywhere tcp dpt:1723 to:192.168.2.6:1723
0 0 DNAT udp -- eth0 any anywhere
anywhere udp dpt:1723 to:192.168.2.6:1723
0 0 DNAT tcp -- eth0 any anywhere
anywhere tcp dpt:5904 to:192.168.2.3:5900
0 0 DNAT udp -- eth0 any anywhere
anywhere udp dpt:5904 to:192.168.2.3:5900

Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source
destination
42 1860 MASQUERADE all -- any eth0 anywhere
anywhere

Chain OUTPUT (policy ACCEPT 14 packets, 892 bytes)
pkts bytes target prot opt in out source
destination
[root@ ~]# cat /proc/sys/net/ipv4/ip_forward
1
 
Old 05-10-2005, 01:03 PM   #4
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Yeah, see, it's MASQUERADEing traffic out from one NIC which means you'd need to forward ports to go between the two networks (or more specifically to go from the eth0-attached network to the other one).

Maybe this thread will help you. You can forward two networks with NETMAP (though, as my post says, I've never tried it so it might not work er as expected).
http://www.linuxquestions.org/questi...95#post1634995

PS I don't know how that will affect your VPN forwards though...

Last edited by michaelsanford; 05-10-2005 at 01:05 PM.
 
  


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
routing jmono Linux - Networking 5 02-07-2006 06:20 AM
Routing gtkmike Linux - Networking 1 11-13-2003 09:21 AM
real routing under nat routing nothingmuch Linux - Networking 4 10-27-2003 03:11 PM
Routing in RH 8.0 Hybrid Blue Linux - Networking 2 10-12-2003 05:41 PM
Routing jimval7 Linux - Networking 3 02-08-2002 04:06 PM

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

All times are GMT -5. The time now is 05:55 AM.

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