This sounds like a routing problem and a problem with name resolution. I
am betting your route command failed because you didn't used the -n
option, and so route failed while doing reverse lookups on your gateway
or default route. Run route -n and see what that shows.
I found out when switching over from a static to a dynamic ip address from
my ISP, that getting the routing info and dns with dhcpcd from the dhcp
server is not the same thing as your running a script on your gatway box
to set up your NIC and routing information. You are using a GUI tool to
configure stuff, but, you are finding out that GUI's can't solve problems.
Here is my network script that I have to run after I get my info from
the dhcp server. Lines 34 to 44 are want you might find of interest for
your problem. (Note: Happily, the information from the server doesn't
change often if at all. Therefore, I have dhcpcd commented out for
now. Note that dhcpcd puts the configuration information in /var/run,
which is bad for me since /var/run is cleaned up with each reboot, so
I moved the configuration file to /etc/. That way there is less danger
I will be assigned a new ip address.)
1 #! /bin/bash
2 #
3 # network Bring up/down networking
4 #
5 # $Id: network,v 1.12 1999/03/16 13:10:24 ray Exp $
6 #
7 # Modified for COL by Raymund Will <[EMAIL PROTECTED]>.
8
9
10 # See how we were called.
11 case "$1" in
12 start)
13 #entry to configure ipchains
14
15
16
17
18 echo 1 > /proc/sys/net/ipv4/ip_forward
19 echo Restoring ipchains
20
21 /sbin/ipchains -F
22 cat /root/ipchains.saved | /sbin/ipchains-restore -f
23 #entry to enable ftp through firewall
24 insmod /usr/src/linux/net/ipv4/ip_masq_ftp.o
25 insmod /usr/src/linux/net/ipv4/ip_masq_quake.o
26 insmod /usr/src/linux/net/ipv4/ip_masq_raudio.o
27 insmod /usr/src/linux/net/ipv4/ip_masq_mfw.o
28 #entry to redirect internet traffic to jhammer6
29 ipmasqadm mfw -I -m 2 -r 192.168.0.6 80
30 ipmasqadm mfw -I -m 3 -r 192.168.0.6 6699
31 ipmasqadm mfw -I -m 4 -r 192.168.0.6 14
32 ipmasqadm mfw -I -m 5 -r 192.168.0.6 6346
33
34 /sbin/ifconfig lo 127.0.0.0
35 route add -net 127.0.0.0 netmask 255.0.0.0 lo
36 /sbin/ifconfig eth0 192.168.0.2 netmask 255.255.255.0 up
37 route add -net 192.168.1.0 netmask 255.255.255.0 eth0
38 # /sbin/dhcpcd -d -h pcp361333pcs-udp079123uds.towson01.md.comcast.net eth1
39 . /etc/dhcpcd-eth1.info
40 /sbin/ifconfig eth1 down
41 /sbin/ifconfig eth1 $IPADDR netmask $NETMASK broadcast $BROADCAST
42 /sbin/route add -net default gw $GATEWAY eth1
43 # /bin/hostname `/usr/bin/host $IPADDR $DNS | sed -n "s/.*pointer *//"`
44 ;;
45 stop)
46 echo 0 > /proc/sys/net/ipv4/ip_forward
47 echo "Shutting down network devices..."
48 # My entry to umount smbfs drives
49 # umount `mount | grep smbfs | xargs -n1 -0 | cut -d' ' -f3` > /dev/null 2>&1
50 mount | grep " type smbfs " | sed 's/^.*on *//' | sed 's/ *type.*//' \
51 | sed 's/ /\\\ /g' | xargs -n1 -i{} umount {}
52 /sbin/ifconfig eth0 down
53 /sbin/ifconfig eth1 down
54 /sbin/ifconfig lo down
55 /sbin/dhcpcd -k eth1
56 ipmasqadm mfw -F
57 rmmod ip_masq_raudio
58 rmmod ip_masq_quake
59 rmmod ip_masq_ftp
60 rmmod ip_masq_mfw
61 /root/ipchains_rotate
62 # ipchains -F
63 ;;
64
65 *)
66 echo "Usage: network {start|stop}"
67 exit 1
68 ;;
69 esac
70
71 exit 0
72
On Fri, Feb 22, 2002 at 02:41:46AM -0800, David Aikema wrote:
> I installed Trustix 1.5 yesterday on a machine I want to use as a gateway
> box. As people wouldn't appreciate being knocked off the internet I was
> forced to install the system, with both nics being given private ip addresses.
>
> I disabled one of the nics after the install and then using webmin I set it
> up to retrieve it's info via dhcp. I hooked up that nic this evening
> directly to the cable modem... and then ran into problems.
>
> I brought up the nic using ifup and it successfully retrieved an ip address
> (overwrote /etc/resolv.conf w/ the new dns servers, etc.). However, I found
> myself unable to reach any systems on the internet.
>
> I ran route to check my routing table... and the command didn't seem to ever
> finish executing... it just froze up somewhere near the end. (around where I
> think the default route would be)
>
> I also tried to manually the default gateway I needed (given by pump's status
> command) in case that would patch up the problems I was having... and then
> ran into this:
> ----
> route add default gw A.B.C.D (replacing A.B.C.D w/ the real ip address)
> SIOCADDRT: File exists
> ----
>
> I'm about fresh out of ideas so I was hoping that you networking gurus out
> there would have a suggestion or two for me.
>
> David Aikema
> _______________________________________________
> Linux-users mailing list - http://linux-sxs.org/mailman/listinfo/linux-users
> Subscribe/Unsubscribe info, Archives,and Digests are located at the above URL.
_______________________________________________
Linux-users mailing list - http://linux-sxs.org/mailman/listinfo/linux-users
Subscribe/Unsubscribe info, Archives,and Digests are located at the above URL.