Cannot access Linux computer from outside LAN - Networking

This is a discussion on Cannot access Linux computer from outside LAN - Networking ; I am having problems with my Linux computer in my LAN. Here is the current setup: * 2WIRE 1701HG gateway/wireless router connected to my ISP via PPPoE. * Two Windows XP computers connected with network cable to the 2WIRE. * ...

+ Reply to Thread
Results 1 to 10 of 10

Thread: Cannot access Linux computer from outside LAN

  1. Cannot access Linux computer from outside LAN

    I am having problems with my Linux computer in my LAN.

    Here is the current setup:

    * 2WIRE 1701HG gateway/wireless router connected to my ISP via PPPoE.
    * Two Windows XP computers connected with network cable to the 2WIRE.
    * Two Windows XP laptops connected wirelessly to the 2WIRE.
    * One Linux computer with Ubuntu 6.06.1 LTS running 2.6.15-27-amd64-
    server kernel. Right now this computer only acts as a file server.

    What I want is this:

    Allow a friend of mine to access via Telnet (or SSH, I couldn't care
    less) the Linux computer and see if he can help me take care of the
    rest of my problems. What I did was, in the 2WIRE, forward port 23 to
    the Linux computer. When I attempted to connect using the public IP, I
    was unable to. I installed a Telnet server on my Windows XP laptop and
    changed the 2WIRE to forward port 23 to the laptop and it worked fine.
    The same thing with the Apache server running on both computer.
    - I can access any hosted service it when I forward to my laptop, but
    not when I forward to the Linux computer.
    - I CAN access the Linux through Telnet using the private IP from
    inside the LAN, as well as the HTTP server.
    - From the Linux computer, I CANNOT ping any website or server outside
    the LAN.
    - The Linux computer has two NICs, but currently one (eth1) is not
    connected to anything.

    My theory is that there is some firewall in the Linux computer denying
    access from the outside world, but I don't know how to determine this.
    Otherwise, it might be a problem regarding the fact that there are two
    NICs on the Linux computer.

    Here is the information I gathered. Let me know if you need more. I
    have superuser access to the Linux computer.


    $ sudo find / -name shorewall
    /etc/webmin/shorewall
    /usr/share/webmin/caldera/shorewall
    /usr/share/webmin/shorewall

    $ sudo find / -name ipchains
    /usr/share/webmin/caldera/ipchains
    /usr/share/webmin/mscstyle3/ipchains

    $ uname -a
    Linux servidor 2.6.15-27-amd64-server #1 SMP Fri Dec 8 18:02:49 UTC
    2006 x86_64
    GNU/Linux

    $ ifconfig -a
    eth0 Link encap:Ethernet HWaddr 00:13:8F:4A:05:17
    inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:
    255.255.255.0
    inet6 addr: fe80::213:8fff:fe4a:517/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:965883 errors:0 dropped:0 overruns:0 frame:0
    TX packets:490426 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:434741646 (414.6 MiB) TX bytes:346893125 (330.8
    MiB)
    Interrupt:201 Base address:0xe800

    eth1 Link encap:Ethernet HWaddr 00:80:AD:00:1E:59
    inet6 addr: fe80::280:adff:fe00:1e59/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:11817 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:3852126 (3.6 MiB)
    Interrupt:185 Base address:0xbc00

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:323 errors:0 dropped:0 overruns:0 frame:0
    TX packets:323 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:32108 (31.3 KiB) TX bytes:32108 (31.3 KiB)

    sit0 Link encap:IPv6-in-IPv4
    NOARP MTU:1480 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)


  2. Re: Cannot access Linux computer from outside LAN

    On May 31, 1:34 am, Bill Marcum wrote:
    > On 30 May 2007 14:26:11 -0700, Philippe Signoret
    >
    >
    >
    > wrote:
    >
    > > I am having problems with my Linux computer in my LAN.

    >
    > > Here is the current setup:

    >
    > > * 2WIRE 1701HG gateway/wireless router connected to my ISP via PPPoE.
    > > * Two Windows XP computers connected with network cable to the 2WIRE.
    > > * Two Windows XP laptops connected wirelessly to the 2WIRE.
    > > * One Linux computer with Ubuntu 6.06.1 LTS running 2.6.15-27-amd64-
    > > server kernel. Right now this computer only acts as a file server.

    >
    > > What I want is this:

    >
    > > Allow a friend of mine to access via Telnet (or SSH, I couldn't care
    > > less) the Linux computer and see if he can help me take care of the
    > > rest of my problems. What I did was, in the 2WIRE, forward port 23 to
    > > the Linux computer. When I attempted to connect using the public IP, I
    > > was unable to. I installed a Telnet server on my Windows XP laptop and
    > > changed the 2WIRE to forward port 23 to the laptop and it worked fine.
    > > The same thing with the Apache server running on both computer.
    > > - I can access any hosted service it when I forward to my laptop, but
    > > not when I forward to the Linux computer.
    > > - I CAN access the Linux through Telnet using the private IP from
    > > inside the LAN, as well as the HTTP server.
    > > - From the Linux computer, I CANNOT ping any website or server outside
    > > the LAN.

    >
    > Can you ping the router? Is the router your default gateway?
    >
    > --
    > "What time is it?"
    > "I don't know, it keeps changing."


    Yes, I can ping the router. How do I know if the router is the default
    gateway? (As you might see, although I forgot to mention it on the
    previous post, I am very, very new to Linux, although I am not
    completely computer-illiterate...).

    $ ping 192.168.3.254
    PING 192.168.3.254 (192.168.3.254) 56(84) bytes of data.
    64 bytes from 192.168.3.254: icmp_seq=1 ttl=255 time=3.59 ms
    64 bytes from 192.168.3.254: icmp_seq=2 ttl=255 time=1.09 ms
    64 bytes from 192.168.3.254: icmp_seq=3 ttl=255 time=0.480 ms
    64 bytes from 192.168.3.254: icmp_seq=4 ttl=255 time=1.23 ms
    64 bytes from 192.168.3.254: icmp_seq=5 ttl=255 time=0.521 ms
    ....



  3. Re: Cannot access Linux computer from outside LAN

    Philippe Signoret wrote:
    > Yes, I can ping the router. How do I know if the router is the default
    > gateway?


    You can use the 'route -n' command for that. It should look something like this:

    $ route -n
    Kernel IP routing table
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.268.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 192.168.3.254 0.0.0.0 UG 0 0 0 eth0

    The first line says that all traffic to the local network goes through eth0. The
    sencond line means that any other address is reached by using gateway
    192.168.3.254.

    If the latter is not configured, your machine essentially has no connection to
    the internet, which is probably the case based on your original posting.

    cu
    Philipp

    --
    Dr. Philipp Pagel Tel. +49-8161-71 2131
    Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
    Technical University of Munich
    http://mips.gsf.de/staff/pagel

  4. Re: Cannot access Linux computer from outside LAN

    On May 31, 3:06 am, Philipp Pagel wrote:
    > Philippe Signoret wrote:
    > > Yes, I can ping the router. How do I know if the router is the default
    > > gateway?

    >
    > You can use the 'route -n' command for that. It should look something like this:
    >
    > $ route -n
    > Kernel IP routing table
    > Destination Gateway Genmask Flags Metric Ref Use Iface
    > 192.268.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    > 0.0.0.0 192.168.3.254 0.0.0.0 UG 0 0 0 eth0
    >
    > The first line says that all traffic to the local network goes through eth0. The
    > sencond line means that any other address is reached by using gateway
    > 192.168.3.254.
    >
    > If the latter is not configured, your machine essentially has no connection to
    > the internet, which is probably the case based on your original posting.
    >
    > cu
    > Philipp
    >
    > --
    > Dr. Philipp Pagel Tel. +49-8161-71 2131
    > Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
    > Technical University of Munichhttp://mips.gsf.de/staff/pagel


    Ah!

    It seems to me I am getting closer to the problem...

    $ route -n
    Kernel IP routeing table
    Destination Gateway Genmask Flags Metric Ref
    Use Iface
    192.168.3.0 0.0.0.0 255.255.255.0 U 0
    0 0 eth0

    After researching a bit on the web, I find that

    $ route add -net default gw 192.168.3.254 dev eth0

    changes the route table to:

    $ route -n
    Kernel IP routeing table
    Destination Gateway Genmask Flags Metric Ref
    Use Iface
    192.168.3.0 0.0.0.0 255.255.255.0 U 0
    0 0 eth0
    0.0.0.0 192.168.3.254 0.0.0.0 UG 0
    0 0 eth0


    I can access the computer from the web! Thanks!

    Now two questions remain:

    1. How can I make this change permanent (i.e. the routing table will
    look like that when I reboot the computer.)
    2. Shouldn't this be happening automatically every time it gets an IP
    from the DHCP server on the router??

    Thanks,
    Philippe


  5. Re: Cannot access Linux computer from outside LAN

    On Thu, 31 May 2007 02:10:25 -0700, Philippe Signoret rearranged some
    electrons to form:

    > On May 31, 3:06 am, Philipp Pagel wrote:
    >> Philippe Signoret wrote:
    >> > Yes, I can ping the router. How do I know if the router is the default
    >> > gateway?

    >>
    >> You can use the 'route -n' command for that. It should look something like this:
    >>
    >> $ route -n
    >> Kernel IP routing table
    >> Destination Gateway Genmask Flags Metric Ref Use Iface
    >> 192.268.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    >> 0.0.0.0 192.168.3.254 0.0.0.0 UG 0 0 0 eth0
    >>
    >> The first line says that all traffic to the local network goes through eth0. The
    >> sencond line means that any other address is reached by using gateway
    >> 192.168.3.254.
    >>
    >> If the latter is not configured, your machine essentially has no connection to
    >> the internet, which is probably the case based on your original posting.
    >>
    >> cu
    >> Philipp
    >>
    >> --
    >> Dr. Philipp Pagel Tel. +49-8161-71 2131
    >> Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
    >> Technical University of Munichhttp://mips.gsf.de/staff/pagel

    >
    > Ah!
    >
    > It seems to me I am getting closer to the problem...
    >
    > $ route -n
    > Kernel IP routeing table
    > Destination Gateway Genmask Flags Metric Ref
    > Use Iface
    > 192.168.3.0 0.0.0.0 255.255.255.0 U 0
    > 0 0 eth0
    >
    > After researching a bit on the web, I find that
    >
    > $ route add -net default gw 192.168.3.254 dev eth0
    >
    > changes the route table to:
    >
    > $ route -n
    > Kernel IP routeing table
    > Destination Gateway Genmask Flags Metric Ref
    > Use Iface
    > 192.168.3.0 0.0.0.0 255.255.255.0 U 0
    > 0 0 eth0
    > 0.0.0.0 192.168.3.254 0.0.0.0 UG 0
    > 0 0 eth0
    >
    >
    > I can access the computer from the web! Thanks!
    >
    > Now two questions remain:
    >
    > 1. How can I make this change permanent (i.e. the routing table will
    > look like that when I reboot the computer.)
    > 2. Shouldn't this be happening automatically every time it gets an IP
    > from the DHCP server on the router??
    >
    > Thanks,
    > Philippe


    I would change the IP address on the Linux box to a fixed address, fixed
    gateway, fixed DNS.

    --
    David M (dmacchiarolo)
    http://home.triad.rr.com/redsled
    T/S 53
    sled351 Linux 2.4.18-14 has been up 7 days 3:30


  6. Re: Cannot access Linux computer from outside LAN

    Philippe Signoret wrote:
    > After researching a bit on the web, I find that


    > $ route add -net default gw 192.168.3.254 dev eth0


    Correct.

    > 1. How can I make this change permanent (i.e. the routing table will
    > look like that when I reboot the computer.)


    As I have never used Ubuntu I can't really offer much help here. Ubuntu
    user to the rescue!

    In a Debian Etch system the relevant configuration file would be
    /etc/network/interfaces. As Ubuntu is Debian based, this may apply
    there, too. For an interface with a static IP you would have to set the
    'gateway' option with the appropriate IP address.

    > 2. Shouldn't this be happening automatically every time it gets an IP
    > from the DHCP server on the router??


    You are absolutely right - the dhcp client should be taking care of
    this. Assuming that etc/network/interfaces exist on Ubuntu - what does
    it look like on you system?

    cu
    Philipp

    --
    Dr. Philipp Pagel Tel. +49-8161-71 2131
    Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
    Technical University of Munich
    http://mips.gsf.de/staff/pagel

  7. Re: Cannot access Linux computer from outside LAN

    On 31 May 2007 02:10:25 -0700, Philippe Signoret wrote:
    >
    > Now two questions remain:
    >
    > 1. How can I make this change permanent (i.e. the routing table will
    > look like that when I reboot the computer.)


    /etc/network/interfaces has the configuration settings.

    > 2. Shouldn't this be happening automatically every time it gets an IP
    > from the DHCP server on the router??


    Yes, depending on how you configured eth0 or what your DHCP server sends.

    If you like you can dump and post your network settings and let us
    look at them.


    -------- standard debug network problem text/script follows: ------------
    dump_net.txt version 2.8


    If you read http://www.catb.org/~esr/faqs/smart-questions.html
    it will suggest you provide any information about your setup which might
    help troubleshoot your problem. Example, internet connection type,
    (cable, adsl,,,), it hardware, (vendor/model of the modem).
    Maybe that your system is hooked to a hub/switch/router and type of
    hookup, (ethernet,usb, wireless,...) .


    If your problem is slow network give a url so we can try it.

    So let's see what you have setup so far.

    Once you get your network running, you may want to run xx one last time
    and save the output file for disk crash/new installs

    Might not hurt to save xx for one of a network debugging checklist steps.


    The following ambidexterous script is for suse, mandriva, ubuntu, kubuntu
    and will dump your hardware status, network settings and config files used
    in network setup. We need that information to troubleshoot your problem.

    If you are having to use windows to access Usenet:
    Format a diskette on the windows system.


    Copy the following xx.txt script into xx.txt using notepad.exe
    then save xx.txt to the diskette/cd/usb stick.

    To get the script results back to Windows and
    none of the above hardware works, you can use http://www.fs-driver.org/
    You do not want some malware writting to linux. You can replace it
    with http://www.diskinternals.com/linux-reader/ which does not
    provide write access if you have not created a FAT partition to
    exchange files between OSs.
    I do recommend removing the windows/linux file system driver after you get the
    linux network up.
    Makes your Windows AntiVirus scanner run much faster after removal.


    Also, it would be nice to include your windows network settings:
    Click up a Prompt/cmd/terminal and add in contents from
    ipconfig /all
    when you respond with linux settings.

    When saving the following xx script, feel free to include the
    #**** start/end xx.txt script **** lines.

    If using linux for usenet access, su - root, copy script text into xx
    chmod +x xx
    ./xx

    and include a.txt (if on linux) or dosa.txt (if on windows) in your reply.

    NOTE: to become root, you need to do a
    su - root
    not su root




    #******** start of xx.txt script ****************

    _fn=a.txt
    _out_fn=$PWD/$_fn
    _dos_fn=$PWD/dos${_fn}
    _home=$PWD

    function cat_fn
    {
    _fn=$1
    if [ -f $_fn ] ; then
    echo ======== cat $_fn ========== >> $_out_fn
    cat $_fn >> $_out_fn
    fi
    } # end cat_fn

    function grep_fn
    {
    _fn=$1
    if [ -e $_fn ] ; then
    echo "======== grep -v '^#' $_fn ==========" >> $_out_fn
    grep -v '^#' $_fn >> $_out_fn
    fi
    } # end grep_fn

    function ls_dir
    {
    _dr=$1
    if [ -d $_dr ] ; then
    echo "========= cd $_dr ; ls -al ========" >> $_out_fn
    cd $_dr
    ls -al >> $_out_fn
    fi
    } # end ls_dir

    function tail_fn
    {
    _fn=$1
    if [ -e $_fn ] ; then
    echo "======== tail -18 $_fn ==========" >> $_out_fn
    tail -18 $_fn >> $_out_fn
    fi
    } # end tail_fn

    #********************************
    # check if commands are in $PATH
    # and if not add them path to $PATH
    #********************************

    _path=""
    type ifconfig > /dev/null 2>&1
    if [ $? -ne 0 ] ; then
    _path="${_path}/sbin:"
    fi

    type cat > /dev/null 2>&1
    if [ $? -ne 0 ] ; then
    _path="${_path}/bin:"
    fi

    type id > /dev/null 2>&1
    if [ $? -ne 0 ] ; then
    _path="${_path}/usr/bin:"
    fi

    if [ -n "$_path" ] ; then
    PATH=${_path}$PATH
    export PATH
    fi

    #********************************
    # check if root and logged in correctly
    #********************************

    _uid=$(id --user)

    if [ $_uid -ne 0 ] ; then
    echo " "
    echo "You need to be root to run $0"
    echo "CLick up a terminal and do the following:"
    echo " "
    echo "su - root"
    echo "$PWD/xx"
    exit 1
    fi

    root_flg=1

    if [ -n "$LOGNAME" ] ; then
    if [ "$LOGNAME" != "root" ] ; then
    root_flg=0
    fi
    fi

    if [ -n "$USER" ] ; then
    if [ "$USER" != "root" ] ; then
    root_flg=0
    fi
    fi

    if [ $root_flg -eq 0 ] ; then
    echo " "
    echo "Guessing you did a su root"
    echo "instead of a su - root"
    echo "please exit/logout of this session and do the following:"
    echo " "
    echo "su - root"
    echo "$PWD/xx"
    echo " "
    exit 1
    fi


    #********************************
    # main code starts here
    #********************************


    echo "Working, output will be in $_out_fn "

    date > $_out_fn
    chmod 666 $_out_fn

    if [ -n "$_path" ] ; then
    echo ======== echo $PATH ========== >> $_out_fn
    echo $PATH >> $_out_fn 2>&1
    fi

    cat_fn /etc/product.id

    echo ======== cat /etc/*release ========== >> $_out_fn
    cat /etc/*release >> $_out_fn 2>&1

    echo ======== uname -rvi ============= >> $_out_fn
    uname -rvi >> $_out_fn

    echo ======== cat /etc/*version ========== >> $_out_fn
    cat /etc/*version >> $_out_fn 2>&1

    echo ======== cat /proc/version ========== >> $_out_fn
    cat /proc/*version >> $_out_fn 2>&1

    type lsb_release > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    echo ======== lsb_release -a ========== >> $_out_fn
    lsb_release -a >> $_out_fn 2>&1
    fi

    echo " " >> $_out_fn
    echo msec security level is $SECURE_LEVEL >> $_out_fn

    echo ======== free ========== >> $_out_fn
    free >> $_out_fn 2>&1

    type chkconfig > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    echo ======== chkconfig --list ========== >> $_out_fn
    for _serv in avahi named tmdns ; do
    chkconfig --list | grep -i $_serv > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    echo "Double check if /$_serv/ needs to be disabled on boot" >> $_out_fn
    chkconfig --list | grep -i $_serv >> $_out_fn
    fi
    done

    chkconfig --list >> $_out_fn

    else
    echo ======== ls -o /etc/rc2.d ========== >> $_out_fn
    for _serv in avahi named tmdns ; do
    ls /etc/rc2.d/S* | grep $_serv > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    echo "Double check if /$_serv/ needs to be disabled on boot" >> $_out_fn
    fi
    done

    ls -o /etc/rc2.d >> $_out_fn
    fi

    _fn=/etc/nsswitch.conf
    if [ -e $_fn ] ; then
    echo ======== grep hosts: $_fn ========== >> $_out_fn
    grep hosts: $_fn >> $_out_fn
    fi

    cat_fn /etc/resolv.conf

    echo ======== hostname ========== >> $_out_fn
    hostname >> $_out_fn

    cat_fn /etc/hostname
    cat_fn /etc/HOSTNAME

    ls /etc/mod*.conf > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    echo "======== grep eth /etc/mod*.conf ==========" >> $_out_fn
    grep eth /etc/mod*.conf >> $_out_fn
    fi

    cat_fn /etc/dhclient-enter-hooks
    cat_fn /etc/dhclient-exit-hooks

    cat_fn /etc/host.conf

    echo ================ ifconfig -a =============== >> $_out_fn
    ifconfig -a >> $_out_fn

    cat_fn /etc/iftab
    cat_fn /etc/udev/rules.d/61-net_config.rules

    echo ============== route -n ================= >> $_out_fn
    route -n >> $_out_fn

    cat_fn /etc/sysconfig/network/routes

    cat_fn /etc/sysconfig/network

    echo ============== head -15 /etc/hosts =============== >> $_out_fn
    head -15 /etc/hosts >> $_out_fn

    cat_fn /etc/network/interfaces
    cat_fn /var/run/network/ifstate


    _cmd=""
    type ethtool > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    _cmd="ethtool"
    fi

    type mii-tool > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    _cmd="mii-tool -v"
    fi

    if [ -z "$_cmd" ] ; then
    echo ======== mii-tool/ethtool NOT INSTALLED ========== >> $_out_fn
    fi

    for nic in 0 1 2 ; do

    if [ -n "$_cmd" ] ; then
    $_cmd eth$nic > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    echo ======== $_cmd eth$nic ========== >> $_out_fn
    $_cmd eth$nic >> $_out_fn
    fi
    fi

    cat_fn /etc/sysconfig/network-scripts/ifcfg-eth$nic

    ifconfig eth$nic > /dev/null 2>&1
    if [ $? -eq 0 ] ; then
    set $(ifconfig eth$nic | tr [A-Z] [a-z])
    cat_fn /etc/sysconfig/network/ifcfg-eth-id-$5
    fi

    tail_fn /var/lib/dhcp/dhclient-eth${nic}.leases
    tail_fn /etc/dhcpc/dhcpcd-eth${nic}.info

    done # end for nic in 0 1 2 ; do

    _dir=/etc/NetworkManager/dispatcher.d
    if [ -d $_dir ] ; then
    ls_dir $_dir

    for _d in "if-up.d" "if-down.d" "if-pre-up.d" "if-post-down.d" ; do
    echo ==== cd /etc/network/${_d} ; ls -al === >> $_out_fn
    cd /etc/network/${_d}
    ls -al >> $_out_fn
    done
    fi

    if [ -d /etc/sysconfig/network-scripts ] ; then
    for _d in "ifdown.d" "ifup.d" ; do
    _cmd="cd /etc/sysconfig/network-scripts/${_d} ; ls -al "
    echo "===== $_cmd ====" >> $_out_fn
    cd /etc/sysconfig/network-scripts/${_d}
    ls -al >> $_out_fn
    done
    fi

    ls_dir /etc/dhcp3/dhclient-exit-hooks.d
    ls_dir /etc/resolvconf/update.d


    if [ -d /etc/shorewall ] ; then
    _count=$(chkconfig --list shorewall | grep -c n )
    if [ $_count -gt 0 ] ; then
    echo "======= Shorewall settings =========" >> $_out_fn
    cd /etc/shorewall
    for _f in $(ls) ; do
    echo "======= $_f =========" >> $_out_fn
    grep -v '^#' $_f >> $_out_fn
    done
    fi
    fi

    cd $_home

    grep_fn /etc/hosts.allow
    grep_fn /etc/hosts.deny
    echo "======= end of config/network data dump ===========" >> $_out_fn

    awk '{print $0 "\r" }' $_out_fn > $_dos_fn
    chmod 666 $_dos_fn


    echo " "
    echo "If posting via linux, post contents of $_out_fn"
    echo "You might want to copy it to your account with the command"
    echo "cp $_out_fn ~your_login"
    echo " "
    echo "If posting via windows, post contents of $_dos_fn"
    echo " "
    echo "If using diskette,"
    echo "Copy $_dos_fn to diskette with the following commands:"
    echo " "
    echo "mkdir -p /floppy"
    echo "mount -t auto /dev/fd0 /floppy"
    echo "cp $_dos_fn /floppy"
    echo "umount /floppy "
    echo " "
    echo "and $_dos_fn is ready for windows from diskette"
    echo " "

    #*********** end of dump xx.txt script *********


    and then copy xx.txt to the diskette.

    On some linux distributions, you may need to get into the User/Group
    screen, show all users, double click root, create the password, and
    enable root. Root's password should never be the same as anyone elses.

    To move xx.txt from diskette to the linux box, click up a linux terminal
    su - root
    (root's passwd)

    mkdir -p /floppy
    mount -t auto /dev/fd0 /floppy
    tr -d '\015' < /floppy/xx.txt > xx
    chmod +x xx
    ../xx

    Back on the windows OS, you can cut/paste the a:\dosa.txt into your reply
    under windows.
    Do not attach it.

    If you are dual booting the box, you can copy xx.txt to linux from windows.
    Note: The following assumes /dev/hda1 is where windows is installed on the
    first partition on the C: drive

    mkdir -p /doze
    mount -t auto /dev/hda1 /doze
    tr -d '\015' < "/doze/whever/you saved/xx.txt" > xx
    umount /doze

    On windows you can read dosa.txt from a linux partition if you installed
    windows linux filesystem driver from
    http://uranus.it.swin.edu.au/~jn/linux/explore2fs.htm
    Remember to remove it to allow your Windows AntiVirus scanner to run faster.

  8. Re: Cannot access Linux computer from outside LAN

    On May 31, 8:12 am, Bit Twister wrote:
    > On 31 May 2007 02:10:25 -0700, Philippe Signoret wrote:
    >
    >
    >
    > > Now two questions remain:

    >
    > > 1. How can I make this change permanent (i.e. the routing table will
    > > look like that when I reboot the computer.)

    >
    > /etc/network/interfaces has the configuration settings.
    >
    > > 2. Shouldn't this be happening automatically every time it gets an IP
    > > from the DHCP server on the router??

    >
    > Yes, depending on how you configured eth0 or what your DHCP server sends.
    >
    > If you like you can dump and post your network settings and let us
    > look at them.
    >
    > -------- standard debug network problem text/script follows: ------------
    > dump_net.txt version 2.8
    >
    > If you readhttp://www.catb.org/~esr/faqs/smart-questions.html
    > it will suggest you provide any information about your setup which might
    > help troubleshoot your problem. Example, internet connection type,
    > (cable, adsl,,,), it hardware, (vendor/model of the modem).
    > Maybe that your system is hooked to a hub/switch/router and type of
    > hookup, (ethernet,usb, wireless,...) .
    >
    > If your problem is slow network give a url so we can try it.
    >
    > So let's see what you have setup so far.
    >
    > Once you get your network running, you may want to run xx one last time
    > and save the output file for disk crash/new installs
    >
    > Might not hurt to save xx for one of a network debugging checklist steps.
    >
    > The following ambidexterous script is for suse, mandriva, ubuntu, kubuntu
    > and will dump your hardware status, network settings and config files used
    > in network setup. We need that information to troubleshoot your problem.
    >
    > If you are having to use windows to access Usenet:
    > Format a diskette on the windows system.
    >
    > Copy the following xx.txt script into xx.txt using notepad.exe
    > then save xx.txt to the diskette/cd/usb stick.
    >
    > To get the script results back to Windows and
    > none of the above hardware works, you can use http://www.fs-driver.org/
    > You do not want some malware writting to linux. You can replace it
    > with http://www.diskinternals.com/linux-reader/which does not
    > provide write access if you have not created a FAT partition to
    > exchange files between OSs.
    > I do recommend removing the windows/linux file system driver after you get the
    > linux network up.
    > Makes your Windows AntiVirus scanner run much faster after removal.
    >
    > Also, it would be nice to include your windows network settings:
    > Click up a Prompt/cmd/terminal and add in contents from
    > ipconfig /all
    > when you respond with linux settings.
    >
    > When saving the following xx script, feel free to include the
    > #**** start/end xx.txt script **** lines.
    >
    > If using linux for usenet access, su - root, copy script text into xx
    > chmod +x xx
    > ./xx
    >
    > and include a.txt (if on linux) or dosa.txt (if on windows) in your reply.
    >
    > NOTE: to become root, you need to do a
    > su - root
    > not su root
    >
    > #******** start of xx.txt script ****************
    >
    > _fn=a.txt
    > _out_fn=$PWD/$_fn
    > _dos_fn=$PWD/dos${_fn}
    > _home=$PWD
    >
    > function cat_fn
    > {
    > _fn=$1
    > if [ -f $_fn ] ; then
    > echo ======== cat $_fn ========== >> $_out_fn
    > cat $_fn >> $_out_fn
    > fi
    >
    > } # end cat_fn
    >
    > function grep_fn
    > {
    > _fn=$1
    > if [ -e $_fn ] ; then
    > echo "======== grep -v '^#' $_fn ==========" >> $_out_fn
    > grep -v '^#' $_fn >> $_out_fn
    > fi
    >
    > } # end grep_fn
    >
    > function ls_dir
    > {
    > _dr=$1
    > if [ -d $_dr ] ; then
    > echo "========= cd $_dr ; ls -al ========" >> $_out_fn
    > cd $_dr
    > ls -al >> $_out_fn
    > fi
    >
    > } # end ls_dir
    >
    > function tail_fn
    > {
    > _fn=$1
    > if [ -e $_fn ] ; then
    > echo "======== tail -18 $_fn ==========" >> $_out_fn
    > tail -18 $_fn >> $_out_fn
    > fi
    >
    > } # end tail_fn
    >
    > #********************************
    > # check if commands are in $PATH
    > # and if not add them path to $PATH
    > #********************************
    >
    > _path=""
    > type ifconfig > /dev/null 2>&1
    > if [ $? -ne 0 ] ; then
    > _path="${_path}/sbin:"
    > fi
    >
    > type cat > /dev/null 2>&1
    > if [ $? -ne 0 ] ; then
    > _path="${_path}/bin:"
    > fi
    >
    > type id > /dev/null 2>&1
    > if [ $? -ne 0 ] ; then
    > _path="${_path}/usr/bin:"
    > fi
    >
    > if [ -n "$_path" ] ; then
    > PATH=${_path}$PATH
    > export PATH
    > fi
    >
    > #********************************
    > # check if root and logged in correctly
    > #********************************
    >
    > _uid=$(id --user)
    >
    > if [ $_uid -ne 0 ] ; then
    > echo " "
    > echo "You need to be root to run $0"
    > echo "CLick up a terminal and do the following:"
    > echo " "
    > echo "su - root"
    > echo "$PWD/xx"
    > exit 1
    > fi
    >
    > root_flg=1
    >
    > if [ -n "$LOGNAME" ] ; then
    > if [ "$LOGNAME" != "root" ] ; then
    > root_flg=0
    > fi
    > fi
    >
    > if [ -n "$USER" ] ; then
    > if [ "$USER" != "root" ] ; then
    > root_flg=0
    > fi
    > fi
    >
    > if [ $root_flg -eq 0 ] ; then
    > echo " "
    > echo "Guessing you did a su root"
    > echo "instead of a su - root"
    > echo "please exit/logout of this session and do the following:"
    > echo " "
    > echo "su - root"
    > echo "$PWD/xx"
    > echo " "
    > exit 1
    > fi
    >
    > #********************************
    > # main code starts here
    > #********************************
    >
    > echo "Working, output will be in $_out_fn "
    >
    > date > $_out_fn
    > chmod 666 $_out_fn
    >
    > if [ -n "$_path" ] ; then
    > echo ======== echo $PATH ==========>> $_out_fn
    > echo $PATH >> $_out_fn 2>&1
    > fi
    >
    > cat_fn /etc/product.id
    >
    > echo ======== cat /etc/*release ========== >> $_out_fn
    > cat /etc/*release >> $_out_fn 2>&1
    >
    > echo ======== uname -rvi ============= >> $_out_fn
    > uname -rvi >> $_out_fn
    >
    > echo ======== cat /etc/*version ========== >> $_out_fn
    > cat /etc/*version >> $_out_fn 2>&1
    >
    > echo ======== cat /proc/version ========== >> $_out_fn
    > cat /proc/*version >> $_out_fn 2>&1
    >
    > type lsb_release > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > echo ======== lsb_release -a ========== >> $_out_fn
    > lsb_release -a >> $_out_fn 2>&1
    > fi
    >
    > echo " " >> $_out_fn
    > echo msec security level is $SECURE_LEVEL >> $_out_fn
    >
    > echo ======== free ========== >> $_out_fn
    > free >> $_out_fn 2>&1
    >
    > type chkconfig > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > echo ======== chkconfig --list ========== >> $_out_fn
    > for _serv in avahi named tmdns ; do
    > chkconfig --list | grep -i $_serv > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > echo "Double check if /$_serv/ needs to be disabled on boot" >> $_out_fn
    > chkconfig --list | grep -i $_serv >> $_out_fn
    > fi
    > done
    >
    > chkconfig --list >> $_out_fn
    >
    > else
    > echo ======== ls -o /etc/rc2.d ========== >> $_out_fn
    > for _serv in avahi named tmdns ; do
    > ls /etc/rc2.d/S* | grep $_serv > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > echo "Double check if /$_serv/ needs to be disabled on boot" >> $_out_fn
    > fi
    > done
    >
    > ls -o /etc/rc2.d >> $_out_fn
    > fi
    >
    > _fn=/etc/nsswitch.conf
    > if [ -e $_fn ] ; then
    > echo ======== grep hosts: $_fn ========== >> $_out_fn
    > grep hosts: $_fn >> $_out_fn
    > fi
    >
    > cat_fn /etc/resolv.conf
    >
    > echo ======== hostname ========== >> $_out_fn
    > hostname >> $_out_fn
    >
    > cat_fn /etc/hostname
    > cat_fn /etc/HOSTNAME
    >
    > ls /etc/mod*.conf > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > echo "======== grep eth /etc/mod*.conf ==========" >> $_out_fn
    > grep eth /etc/mod*.conf >> $_out_fn
    > fi
    >
    > cat_fn /etc/dhclient-enter-hooks
    > cat_fn /etc/dhclient-exit-hooks
    >
    > cat_fn /etc/host.conf
    >
    > echo ================ ifconfig -a =============== >> $_out_fn
    > ifconfig -a >> $_out_fn
    >
    > cat_fn /etc/iftab
    > cat_fn /etc/udev/rules.d/61-net_config.rules
    >
    > echo ============== route -n ================= >> $_out_fn
    > route -n >> $_out_fn
    >
    > cat_fn /etc/sysconfig/network/routes
    >
    > cat_fn /etc/sysconfig/network
    >
    > echo ============== head -15 /etc/hosts =============== >> $_out_fn
    > head -15 /etc/hosts >> $_out_fn
    >
    > cat_fn /etc/network/interfaces
    > cat_fn /var/run/network/ifstate
    >
    > _cmd=""
    > type ethtool > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > _cmd="ethtool"
    > fi
    >
    > type mii-tool > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > _cmd="mii-tool -v"
    > fi
    >
    > if [ -z "$_cmd" ] ; then
    > echo ======== mii-tool/ethtool NOT INSTALLED ========== >> $_out_fn
    > fi
    >
    > for nic in 0 1 2 ; do
    >
    > if [ -n "$_cmd" ] ; then
    > $_cmd eth$nic > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > echo ======== $_cmd eth$nic ========== >> $_out_fn
    > $_cmd eth$nic >> $_out_fn
    > fi
    > fi
    >
    > cat_fn /etc/sysconfig/network-scripts/ifcfg-eth$nic
    >
    > ifconfig eth$nic > /dev/null 2>&1
    > if [ $? -eq 0 ] ; then
    > set $(ifconfig eth$nic | tr [A-Z] [a-z])
    > cat_fn /etc/sysconfig/network/ifcfg-eth-id-$5
    > fi
    >
    > tail_fn /var/lib/dhcp/dhclient-eth${nic}.leases
    > tail_fn /etc/dhcpc/dhcpcd-eth${nic}.info
    >
    > done # end for nic in 0 1 2 ; do
    >
    > _dir=/etc/NetworkManager/dispatcher.d
    > if [ -d $_dir ] ; then
    > ls_dir $_dir
    >
    > for _d in "if-up.d" "if-down.d" "if-pre-up.d" "if-post-down.d" ; do
    > echo ==== cd /etc/network/${_d} ; ls -al === >> $_out_fn
    > cd /etc/network/${_d}
    > ls -al >> $_out_fn
    > done
    > fi
    >
    > if [ -d /etc/sysconfig/network-scripts ] ; then
    > for _d in "ifdown.d" "ifup.d" ; do
    > _cmd="cd /etc/sysconfig/network-scripts/${_d} ; ls -al "
    > echo "===== $_cmd ====" >> $_out_fn
    > cd /etc/sysconfig/network-scripts/${_d}
    > ls -al >> $_out_fn
    > done
    > fi
    >
    > ls_dir /etc/dhcp3/dhclient-exit-hooks.d
    > ls_dir /etc/resolvconf/update.d
    >
    > if [ -d /etc/shorewall ] ; then
    > _count=$(chkconfig --list shorewall | grep -c n )
    > if [ $_count -gt 0 ] ; then
    > echo "======= Shorewall settings =========" >> $_out_fn
    > cd /etc/shorewall
    > for _f in $(ls) ; do
    > echo "======= $_f =========" >> $_out_fn
    > grep -v '^#' $_f >> $_out_fn
    > done
    > fi
    > fi
    >
    > cd $_home
    >
    > grep_fn /etc/hosts.allow
    > grep_fn /etc/hosts.deny
    > echo "======= end of config/network data dump ===========" >> $_out_fn
    >
    > awk '{print $0 "\r" }' $_out_fn > $_dos_fn
    > chmod 666 $_dos_fn
    >
    > echo " "
    > echo "If posting via linux, post contents of $_out_fn"
    > echo "You might want to copy it to your account with the command"
    > echo "cp $_out_fn ~your_login"
    > echo " "
    > echo "If posting via windows, post contents of $_dos_fn"
    > echo " "
    > echo "If using diskette,"
    > echo "Copy $_dos_fn to diskette with the following commands:"
    > echo " "
    > echo "mkdir -p /floppy"
    > echo "mount -t auto /dev/fd0 /floppy"
    > echo "cp $_dos_fn /floppy"
    > echo "umount /floppy "
    > echo " "
    > echo "and $_dos_fn is ready for windows from diskette"
    > echo " "
    >
    > #*********** end of dump xx.txt script ...
    >
    > read more


    Thanks all for your replies.

    Here is the /etc/network/interfaces file:

    -------------
    auto lo
    iface lo inet loopback

    auto eth0
    iface eth0 inet static
    address 192.168.3.1
    netmask 255.255.255.0

    auto eth1
    iface eth1 inet dhcp

    auto ath0
    iface ath0 inet dhcp

    auto wlan0
    iface wlan0 inet dhcp


    auto dsl-provider
    iface dsl-provider inet ppp
    provider dsl-provider

    pre-up /sbin/ifconfig eth2 up # line maintained by pppoeconf

    # added by pppoeconf
    auto eth2
    iface eth2 inet manual
    ----------------------

    Remember that originally this computer was in charge of maintaining a
    PPPoE connection to the internet and doing all the routing. Eventually
    I want to get this working again, but for now I just want it to work
    normally as a client computer.

    Thanks,
    Philippe


  9. Re: Cannot access Linux computer from outside LAN

    Philippe Signoret wrote:

    > iface eth0 inet static
    > address 192.168.3.1
    > netmask 255.255.255.0


    Ah - here we go: Your IP address is not received by dhcp - it's static
    and lacks a gateway definition. Add this to the entry and you are set:

    gateway 192.168.3.254

    If you want the machine to get the IP by dhcp replace the entire entry
    by

    iface eth0 inet dhcp

    cu
    Philipp

    --
    Dr. Philipp Pagel Tel. +49-8161-71 2131
    Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
    Technical University of Munich
    http://mips.gsf.de/staff/pagel

  10. Re: Cannot access Linux computer from outside LAN

    On May 31, 4:32 pm, Philipp Pagel wrote:
    > Philippe Signoret wrote:
    > > iface eth0 inet static
    > > address 192.168.3.1
    > > netmask 255.255.255.0

    >
    > Ah - here we go: Your IP address is not received by dhcp - it's static
    > and lacks a gateway definition. Add this to the entry and you are set:
    >
    > gateway 192.168.3.254
    >
    > If you want the machine to get the IP by dhcp replace the entire entry
    > by
    >
    > iface eth0 inet dhcp
    >
    > cu
    > Philipp
    >
    > --
    > Dr. Philipp Pagel Tel. +49-8161-71 2131
    > Dept. of Genome Oriented Bioinformatics Fax. +49-8161-71 2186
    > Technical University of Munichhttp://mips.gsf.de/staff/pagel


    Excellent!

    I will leave the IP static since Webdrive (program on the XPs which
    reads/writes the shared folders) has that IP configured, I will just
    add the gateway line.

    Thank you very much for all your help.

    I'll probably be posting soon when I set up the Linux comp to do the
    routing / firewalling / DHCPing.


+ Reply to Thread