Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

/etc/hosts

  • 29-01-2004 6:38pm
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    OK need help,

    trying to get a lan going.
    Have a linux server with mysql and apache running

    Want to view the pages from my windows machine:

    ran netconfig with the following:
    ip Add: 192.168.1.1
    network: 255.255.255.0
    Def Gateway:192.168.1.254
    Prim NameServer: 192.168.1.1


    edited the etc/hosts files with the following:
    192.168.1.1 excelsior (linux machine)
    192.168.1.2 hal (windows machine)

    on the hosts file on my windows machine:
    192.168.1.1 excelsior (linux machine)
    192.168.1.2 hal (windows machine)

    I launch IE and type http://excelsior, but it pops up the dialog
    work offline or connect to the internet

    I clcik work offline and i get nothing, page not found???

    any ideas,

    thanks guys!!
    :)


Comments

  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    try pinging 192.168.1.1 first at the command line using the windows machine

    c:> ping 192.168.1.1
    if you get a responce you know your network is working

    now on the linux machine
    make sure httpd is running
    make sure mysqld is running

    you did not say what linux os you or using

    REDHAT
    service mysqld start
    service httpd start

    suse:
    rcmysqld start
    rchttpd start

    IE settings
    remember to set the proxy setting in IE
    do not use proxy server for address begining with
    192.*.*.*
    if all went well
    on the windows machine type http://192.168.1.1 in IE
    you should see your pages


  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    have tried pinging the linux box, but requests are timing out, any ideas??


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Originally posted by king_of_inismac

    Def Gateway:192.168.1.254
    Prim NameServer: 192.168.1.1
    :)

    These lines are not helping.
    You've set your system's default gateway to a machine that (I think) doesn't exist.
    In addition, you didn't mention that you were running a nameserver on 192.168.1.1, so it's unlikely you are!
    Your system can't resolve excelsior.
    Check whether your hosts file is working from the cmd line.
    Try ping excelsior. Even if it doesn't work, it should return the IP address.
    Where you put the windows hosts file depends on the windows version.
    Also make sure (if you wrote the file in notepad or something) that windows didn't tack on a hidden .txt at the end.
    That will stop it working.
    Best bet for a hosts file is DOS edit at the prompt.

    Can you ping the windows machine from the linux box?


  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    have removed those lines you suggested, but what should i replaced them with???

    Im not running a DNS server on the linux machine.

    hosts file on the windows machine seems to be working fine, because whn i ping excelsior it returns 192.168.1.1

    I cant ping the windows machine from the linux box either, but the hosts file seems to be working there because when i type ping hal (windows machine) it returns 192.168.1.2

    Was just thinking, could it be a problem with the tcp/ip properties of my lan on my windows machine??

    Ive set them as the following:

    ip: 192.168.1.2
    subnet mask 255.255.255.0
    gateway : blank

    any ideas??


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    Are you using a hub/switch?

    If not have you used cross-over cable to connect the two boxes?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    No, Im not using a switch or hub,

    Im using a cross over cable as suggested


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    In that case have you checked the subnet of the Windows box to be 255.255.255.0 ?


  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    ya, windows lan TCP/IP subnet mask is set to 255.255.255.0??


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    Do you get two green lights indicating connectivity betwixt the two NICs?


  • Moderators, Recreation & Hobbies Moderators, Science, Health & Environment Moderators, Technology & Internet Moderators Posts: 93,604 Mod ✭✭✭✭Capt'n Midnight


    Did you connect with http://192.168.1.x ?
    if so then an name resolution problem or similar

    NB. make sure there are geen lights at both ends of the cable.

    Try pinging 192.168.1.255
    and then do an ARP -A to see if there are any MAC addresses

    RE. IE work off / line / connect to internet - change the tools options connections to LAN


  • Advertisement
  • Closed Accounts Posts: 23 silver surfer


    have you tried the ifconfig command from the command line and confirm all your settings in there ?

    Here is a good list of cmd's, have a look at the ifconfig and ifup ifdown ones along with linuxconf if you have that on you distro !

    http://www.er.uqam.ca/nobel/r10735/unixcomm.html#tth_sEc1


  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    ok, the saga continues,:-) there pinging each othe now, but IE wont display the web-page??


  • Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭king_of_inismac


    ok, heres the full list of data:

    ipconfig on windows machine:
    ip address 192.168.1.2
    subnet Mask 255.255.255.0
    default gateway: Blank

    ifconfig on linux machine:
    eth0 Link encap:Ethernet HWaddr 00:A0:4B:06:BC:14
    inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:115 errors:0 dropped:0 overruns:0 frame:0
    TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:13796 (13.4 Kb) TX bytes:3300 (3.2 Kb)
    Interrupt:10 Base address:0x7000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:162 errors:0 dropped:0 overruns:0 frame:0
    TX packets:162 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:15487 (15.1 Kb) TX bytes:15487 (15.1 Kb)

    IE lan settings:
    automatically detect settings:unticked
    automatic configuration script: unticked
    proxy server: unticked

    anyone got any ideas??


  • Registered Users, Registered Users 2 Posts: 811 ✭✭✭Rambo


    disable the firewall on the linux machine


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    ps -ax | grep httpd

    Is apache running?


  • Registered Users, Registered Users 2 Posts: 2,591 ✭✭✭tommycahir


    apache
    have you set the document root in the httpd.conf file to be the directory with the index.html file in it.
    have you set it to listen on port 80


  • Registered Users, Registered Users 2 Posts: 2,755 ✭✭✭niallb


    Originally posted by king_of_inismac
    ...

    I clcik work offline and i get nothing, page not found???

    any ideas,
    :)

    Try not clicking on "Work Offline"!
    You're telling IE not to use ANY network connections.

    Try connecting to the internet with explorer
    and then try your local connection again.

    If that works you can persuade IE not to go online
    every time you click a link.

    NiallB


  • Closed Accounts Posts: 5,564 ✭✭✭Typedef


    Oh yeah.

    /casts mind back to winders use.

    Isn't there some naff way to tell IE to look for LAN connections before trying to instanciate a DUN connection?


  • Closed Accounts Posts: 210 ✭✭deimos


    If its Redhat, it might have some stuff firewalled, eg http using iptables or ipchains.


    try the commands........


    iptables -F
    ipchains -F


  • Registered Users, Registered Users 2 Posts: 68,317 ✭✭✭✭seamus


    Originally posted by Typedef
    Oh yeah.

    /casts mind back to winders use.

    Isn't there some naff way to tell IE to look for LAN connections before trying to instanciate a DUN connection?
    Ya
    Start->Run...

    Type "control inetcpl.cpl"

    Click on the Connections tab.

    Select "Dial whenever a network connection is not present" or better yet, "Never dial a connection" (Stops pseky adwarez trying to dial out).

    Ok, apply, etc


  • Advertisement
Advertisement