PDA

View Full Version : [Q] Newbie routing problem...


TheEdge
7th October 2004, 12:28 PM
G'Day,

- My network is as follows

Internet -- Router --- FedoraCore2Box --- Network Hosts

Router: Dynamic External Address
192.168.40.1 Internal Address

Fedora:

5: eth0: <BROADCAST,MULTICAST,UP> mtu 1492 qdisc pfifo_fast qlen 1000
link/ether 00:40:63:d8:57:29 brd ff:ff:ff:ff:ff:ff
inet 192.168.40.3/24 brd 192.168.40.255 scope global eth0
inet6 fe80::240:63ff:fed8:5729/64 scope link
valid_lft forever preferred_lft forever
6: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:40:63:d8:57:01 brd ff:ff:ff:ff:ff:ff
inet 10.40.1.3/16 brd 10.40.255.255 scope global eth1
inet6 fe80::240:63ff:fed8:5701/64 scope link
valid_lft forever preferred_lft forever

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.40.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
10.40.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 192.168.40.1 0.0.0.0 UG 0 0 0 eth0

I want to forward all packets from eth1 (10.40.1.3) to eth0 192.168.40.3 and use eth0's gateway if 192.168.40.1 to get out to the net. The router (192.168.40.1) is doing NAT the only issue is getting the packets from eth1 --> eth0 and then back from eth0-->eth1. I have no firewalling on the Fedora box and just want to add the necessary static routes. Can anyone help me out here?

TIA

superbnerd
7th October 2004, 12:52 PM
Sorry, but I am tired. Are you trying to setup fc2 as a gateway for you network? if so check this out http://fedoranews.org/contributors/thomas_andersen/gateway

You should be using a firewall. Check out firestarter.sourceforge.net install it via yum (fedorafaq.org/#installsoftware) yum install firestarter Here is another tutorial on internet connection sharring (http://firestarter.sourceforge.net/manual/nat.php).

TheEdge
7th October 2004, 12:59 PM

<RANT>
Do me a favour and read the post!!!! I am not trying to do simple conenction sharing. All I need to be able to do is add the relevant routes. I have given more than enough info about my network setup that surely warrants a better reply than I am tired so I have only half read your post.
</RANT>

crackers
8th October 2004, 04:12 AM
Chill a bit, Edge. Superbnerd's partially correct - the Linux "firewall" also functions as a packet router. To make it easy, install a UI package like Firestarter or GuardDog and you can set up routing quite easily.