Opensuse 11 can't connet to internet through centos firewall


Just installed opensuse 11 and noticed network connection does not work, on the same machine i can boot to windows and network does work with it.
Machine does have 2 network cards one to connect samba server wich is not my firewall machine it’s just another computer and it does have static ip and that samba connection works, another network card that does connect to internet wich is the one that doesen’t work.
Ifconfig eth1 shows that it does have lan ip and netmask wich seem to right

I connect to internet through centos 5.2 firewall machine like this: dsl modem -> centos box -> opensuse/windows machine.
Centos machine does have dhcp server running and connection is made through iptables configuration.
I can’t ping or make ssh connection to this centos firewall computer with opensuse.

So far i have tryed to google the prob, various network settings like static ip and service network restart gives all green done messages so no errors there.

1ste thing would be to check if dns and route table are in order (seeing you are getting a correct ip address)

If you will, post the output of
/sbin/route -n
cat /etc/resolv.conf

also any drops or errors listed in the ifconfig output?


sbin/route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     0      0        0 eth0   U     0      0        0 eth1     U     0      0        0 eth0       U     0      0        0 lo

cat /etc/resolv.conf

# Modified_by:  dhcpcd
# Backup:       /etc/
# Process:      dhcpcd
# Process_id:   2686
# Script:       /sbin/modify_resolvconf
# Saveto:
# Info:         This is a temporary resolv.conf created by service dhcpcd.
#               The previous file has been saved and will be restored later.
#               If you don't like your resolv.conf to be changed, you
#               can set MODIFY_{RESOLV,NAMED}_CONF_DYNAMICALLY=no. This
#               variables are placed in /etc/sysconfig/network/config.
#               You can also configure service dhcpcd not to modify it.
#               If you don't like dhcpcd to change your nameserver
#               settings
#               then either set DHCLIENT_MODIFY_RESOLV_CONF=no
#               in /etc/sysconfig/network/dhcp, or
#               set MODIFY_RESOLV_CONF_DYNAMICALLY=no in
#               /etc/sysconfig/network/config or (manually) use dhcpcd
#               with -R.  If you only want to keep your searchlist, set
#               DHCLIENT_KEEP_SEARCHLIST=yes in /etc/sysconfig/network/dhcp or
#               (manually) use the -K option.
domain site


ifconfig eth1

eth1      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:  Bcast:  Mask:
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:29 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:866 (866.0 b)  TX bytes:4753 (4.6 Kb)
          Interrupt:22 Base address:0x4000

#route add -net netmask gw centos 5.2 lan ip address

yep, seems the default route is missing.
I’ve seen this happen sometimes when switching from DHCP to static ip back to DHCP. Clearing out the nic configuration and reconfiguring usually sorts this…

Ok now i get this.

su -
route add -net netmask gw 192.168.1.x
SIOCADDRT: No such process

There’s a special syntax for the default gateway:

route add default gw x.x.x.x

This is in route’s man page.

Thank you folks now i know it’s something with route.