[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Failing to use Linux PC as router



Some weeks ago I bought an AMD64 X2 which now I must connect to
the internet, using my old Pentium 4 as router to the dynamic
address I receive from my cable provider whenever I boot. Having
used Testing since it came up in Potato times, I never needed and
never acquired networking knowledge. Debian did all that for me,

After three weeks of studying books, manuals and HOWTOS and try-
ing to configure the two computers, I am constantly running in
circles. I can ping from one computer to the other and from the
old computer to the internet, and I can do everything I did be-
fore with my old computer, but there is no connection at all
between the new one and the internet. This I need urgently be-
cause the AMD 64 has only a daily build netinst Etch I downloa-
ded and burned to disk on October 17th. It is terribly castra-
ted (even using 'more' instead of 'less'), but there is no way
out of the networking circles without apt-get or aptitude which
seem to be unreachable. My third computer, the one within the
skull, seems to be rapidly loosing flexibility and efficiency
after an uptime of more than 75 years.

I have tried to sum up the important data using the names in
the following paragraph. Real names are different, of course.
All this is a bit lengthy, but since I avoid opening attach-
ments wherever I can i think it is better to leave it in the
body of the posting..

====================================================================
OLD     -           old computer, Intel Pentium 4 2.40 GHz,
                    Debian Testing, Kernel 2.6.17-2-686 (Debian 2.6.
                    17-9); INTERFACES eth0 and eth1
NEW     -           new computer, AMD Athlon 64 X2 Dual Core 4200+.
                    Debian Testing, Kernel 2.6.17-2-amd64 (Debian 2.
                    6.17-9); ETCH NETINST daily build 17.10.06;
                    INTERFACES eth0 (?Firewire? - weird MAC-address)
                    and eth1 WHICH I CHANGED TO oth0 and oth1 in
                    /etc/udev/rules.d/z25_persistent-net.rules(and
                    eth* to oth* in /etc/udev/rules.d/z45_persistent
                    -net-generator.rules) to avoid ambivalent names
                    when trying to configure bridge br0
ISP     -           my cable provider
e0:0e:e0:0e:e0:0e   MAC-address of eth1 interface in OLD
xxx.xx.xxx.         the first three dotted decimals of the address
                    received from my provider (officially dynamic,
                    but since years never changing)
====================================================================
/etc/hosts
====================================================================
OLD:
====
127.0.0.1       localhost
192.168.1.1     OLD.local       OLD
192.168.1.2     OLD.ISP.at      ISP
192.168.1.3     NEW.local       NEW
NEW:
====
127.0.0.1       localhost
192.168.1.3     NEW.local       NEW
192.168.1.1     OLD.local       OLD
AND IN THE FILES /etc/hosts OF BOTH COMPUTERS another 6 IPv6 capable
hosts which up to now are neither used nor commented out
====================================================================
/etc/hosts.allow:                   /etc/hosts.deny:
====================================================================
OLD     ALL: OLD NEW                OLD:    ALL: ALL
NEW     ALL: NEW OLD                NEW:    ALL: ALL
====================================================================
/etc/networks
====================================================================
OLD:
====
localnet 192.168.1.0
NEW:
====
localnet 192.168.1.0
====================================================================
/etc/network/interfaces
====================================================================
OLD:
====
# The loopback interface
auto lo
iface lo inet loopback
# The first network card
up sysctl -w net.ipv4.ip_forward=1
auto eth0
iface eth0 inet dhcp
        address 192.168.1.2
        netmask 255.255.255.0
        inet_route add default gw 192.168.1.0/24
        up iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0\
        -j MASQUERADE
                #*# Shouldn't these two lines be enough to guarantee
                    dhcp access for BOTH computers ??? #*#
# The second network card
auto eth1
iface eth1 inet static
        address 192.168.1.1
        netmask 255.255.255.0
up iptables -A FORWARD -s 192.168.1.3 -d 192.168.1.2
up iptables -A FORWARD -s 192.168.1.2 -d 192.168.1.3
                #*# Two lines added because route and MASQUERADE of
                    eth0 seemed useless, but didn't help either #*#
#*# TRIED after setting eth0 to inet static,
    but TOTALLY COMMENTED OUT after resetting
    eth0 to dhcp because the br0 did not find
    oth0: #*#
    # auto br0
    # iface br0 inet dhcp
    #   inet_route add default gw 192.168.1.0/24
    #   bridge_ports eth0 eth1 oth1
    #   bridge_hw e0:0e:e0:0e:e0:0e
NEW:
====
# The loopback interface
auto lo
iface lo inet loopback
# The second network card
up sysctl -w net.ipv4.ip_forward=1
auto oth1
iface oth1 inet static
        address 192.168.1.3
        netmask 255.255.255.0
====================================================================        
route -nv
====================================================================
OLD:
====
Kernel IP Routentabelle
Ziel            Router       Genmask       Flags Metric Ref UseIface
(= Destination)
192.168.1.0     0.0.0.0      255.255.255.0 U     0      0     0 eth1
xxx.xx.xxx.0    0.0.0.0      255.255.255.0 U     0      0     0 eth0
0.0.0.0         xxx.xx.xxx.1 0.0.0.0       UG    0      0     0 eth0
NEW:
====
Kernel IP Routentabelle
Ziel           Router       Genmask         Flags Metric Ref UseIface
0.0.0.0        192.168.1.1  255.255.255.255 UGH   0      0     0 oth1
192.168.1.0    0.0.0.0      255.255.255.0   U     0      0     0 oth0
=====================================================================
PINGS (examples, shortened; of course I pinged over and over aganin)
=====================================================================
OLD:
====
PING localhost (127.0.0.1): 56 data bytes
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.1 ms
PING OLD.local (192.168.1.1): 56 data bytes
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.0/0.0/0.1 ms
PING NEW.local (192.168.1.3): 56 data bytes
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.1/1.4/2.8 ms
PING debian.org (192.25.206.10): 56 data bytes
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 170.2/172.6/176.9 ms
NEW:
====
PING localhost (127.0.0.1): 56(84) bytes of data
4 packets transmitted, 4 packets received, 0% packet loss time 3000ms
round-trip min/avg/max/mdev = 0.008/0.014/0.029/0.009 ms
PING NEW.local (192.168.1.3): 56 bytes of data
4 packets transmitted, 4 packets received, 0% packet loss time 3002ms
round-trip min/avg/max/mdev = 0.008/0.012/0.025/0.008 ms
PING OLD.local (192.168.1.1): 56 bytes of data
4 packets transmitted, 4 packets received, 0% packet loss time 2997ms
round-trip min/avg/max/mdev = 0.108/0.117/0.127/0.011 ms
PING debian.org
    #*# ABSOLUTELY NOTHING; ctrl-c-ed empty line #*#

Thank you for trying to help!
Yours
Hans Vogelsberger



Reply to: