Dears,
in attempt to configure a RH9 machine as proxy-filtering server, I
can't figure how to write /etc/sysconfig/* files for setup the right
default gateway and default gateway device on boot.
The machine has two ethernet nics:
eth0 Link encap:Ethernet HWaddr 00:80:5F:C7:7D:53
inet addr:10.47.0.107 Bcast:10.47.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1753462 errors:41 dropped:0 overruns:0 frame:41
TX packets:256949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:825196544 (786.9 Mb) TX bytes:22559469 (21.5 Mb)
Interrupt:9 Base address:0x3800
eth1 Link encap:Ethernet HWaddr 00

0:B7:69:26:9B
inet addr:10.47.20.107 Bcast:10.47.20.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:974055 errors:0 dropped:0 overruns:0 frame:0
TX packets:53679 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:188098720 (179.3 Mb) TX bytes:3537363 (3.3 Mb)
Interrupt:5 Base address:0x2000 Memory:c6cfe000-c6cfe038
eth0 is the inside interface listening for private subnets traffic,
while eth1 provides the internet access.
This is the actual and RIGHT routing table:
10.47.0.0/24 dev eth0 scope link
172.18.0.0/16 via 10.47.0.1 dev eth0
172.19.0.0/16 via 10.47.0.1 dev eth0
169.254.0.0/16 dev eth1 scope link
172.17.0.0/16 via 10.47.0.1 dev eth0
10.47.0.0/16 dev eth1 scope link
192.168.0.0/16 via 10.47.0.1 dev eth0
10.0.0.0/8 via 10.47.0.1 dev eth0
127.0.0.0/8 dev lo scope link
default via 10.47.0.1 dev eth1 <<<
NOTE: although eth0 is the 10.47.0.0/24 interface, all the traffic not
concerning to the specified routes (0.0.0.0) must pass via 10.47.0.1
THROUGH the eth1 device.
All is working fine, the final step is to configure RedHat's files to
bring up the current routing table on boot.
FYI, I pasted the content of the interested files below:
# cd /etc/sysconfig/network-scripts
# cat ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
BROADCAST=10.47.0.255
IPADDR=10.47.0.107
NETMASK=255.255.255.0
NETWORK=10.47.0.0
GATEWAY=10.47.0.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
# cat ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
BROADCAST=10.47.20.255
IPADDR=10.47.20.107
NETMASK=255.255.0.0
NETWORK=10.47.0.0
GATEWAY=10.47.0.1
TYPE=Ethernet
USERCTL=no
PEERDNS=yes
# cat route-eth0
172.18.0.0/16 via 10.47.0.1 dev eth0
172.19.0.0/16 via 10.47.0.1 dev eth0
172.17.0.0/16 via 10.47.0.1 dev eth0
192.168.0.0/16 via 10.47.0.1 dev eth0
10.0.0.0/8 via 10.47.0.1 dev eth0
# cat ../network
NETWORKING=yes
HOSTNAME=as-lnx07.benetton.org
GATEWAYDEV=eth1
GATEWAY=10.47.0.1
Although the last file is configured to bring up the default gateway
through the device eth1, /etc/init.d/network bgrings it up to the device
eth0.
I really could not believe about the complexity of those startup
scripts, and really, this is the first time I ask on usenet for such a
stupid question, but Internet this time did not help too much.
Could anybody help me?
Thanks in advance.
Fabio