route

jludwig wralphie at comcast.net
Mon Mar 14 23:53:42 UTC 2005


On Monday 14 March 2005 05:32 pm, Gu, John A. (US SSA) wrote:
> I have a problem by setting the Fedora 2 as a router on a desktop with 2
> interfaces. The problem is it does not forward or route the packet to
> the other interface (ping is failed). I have turned on the routed. The
> routing table has one default on eth0. And I tried to add another
> default on eth1. But it does not work either.
>
> Help is needed.
>
> John

First verify that the firewall and system (route, sysctl) are set for 
forwarding.
***************
Firewall should have a rule somewhat like this;
iptables FORWARD -i eth1 -o eth0 ACCEPT
***************
[root at jMOD init.d]# cat /proc/sys/net/ipv4/ip_forward
should be  1
if it is 0
[root at jMOD echo 1 > /proc/sys/net/ipv4/ip_forward
and see below.
******
In sysctl.conf 
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

**************
[root at jMOD init.d]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.14.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.12.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
0.0.0.0         192.168.12.1    0.0.0.0         UG    0      0        0 eth0 
**************
Change the routing with Network program under system settings.
-- 
John H Ludwig




More information about the fedora-list mailing list