Page 4 of 12 FirstFirst 123456789101112 LastLast
Results 31 to 40 of 118

Thread: Linux help needed - make fun of the N00b

  1. #31
    FLAC
    Join Date
    Jan 2008
    Location
    Dartmouth, MA
    Posts
    916
    Seems like you don't fully understand what DNS does...

    When you type a URL in to a web browser or any other program, it goes out to a DNS server which in a home-type environment would be a server owned by your ISP or in a corporate environment, the company usually has its own DNS server.

    So
    Step 1: type in URL
    Step 2: it calls up the dns server
    Step 3: the dns server sends the computer the ip address setup for that domain
    Step 4: the browser now requests the web page from that ip address
    Step 5: apache checks to see if the domain name matches any domains set up on the server
    Step 6: apache connects the browser to the appropriate virtual host.

    So by setting a domain name on the web server, you effectively do absolutely nothing, without a record set up in the DNS server. With that said, you have some options.

    The easiest, but possibly least effective, method is to edit the hosts file on whatever devices you know are going to access the web server. The hosts file is essentially a file which overrides the dns server for specific domain names. So right now I'm on a windows machine to edit my hosts file, I would browse to C:\Windows\System32\drivers\etc and open a text file which is called hosts. In there there are lines that look like this:
    Code:
    127.0.0.1       	localhost
    What that line says is: when someone tries to connect to the domain "localhost" connect them to the ip address 127.0.0.1

    You can add a bunch of those lines if you want to, so on any computer you could add a line something like this... I'm using 192.168.1.102 as an example IP address for the sheeva.
    Code:
    192.168.1.102  www.ibug.plug
    Now, every time you enter www.ibug.plug into a web browser on the computer whose hosts file you just modified the browser takes you to 192.168.1.102.

    Since Mac OS X likes to dumb things down, there is a GUI manager to do this task with the instructions found here: http://support.apple.com/kb/TA27291

    Now I recognize that the place you really want to do this is on your iphone. To do this, the iphone needs to be jailbroken. Once jailbroken, you SSH into it and in either the /etc/ or /private/etc/ directory there is a hosts file. Use whatever text editor exists from the iphone terminal to edit it.

    It should also be pretty easy to find on any other device/operating system.
    My Nearly Complete Car:
    http://www.mp3car.com/vbulletin/show...ed-car-pc.html

    Micro Control Center... Control Your Car Across the Internet
    http://www.mp3car.com/fusion-brain/1...-internet.html

    Website: (It's a work in progress, really. All my projects have taken me from ever really developing it.)
    http://paulfurtado.com/

  2. #32
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    Quote Originally Posted by PaulF View Post
    Seems like you don't fully understand what DNS does...
    I'd say that's accurate! I sort of understand the concept on the world wide web but I guess I thought that setting this in the config file would inform my home network router of the domain. Same way as it knows when I type 192.x.x.x that it shouldn't look outside of my network, but instead inside.

    I suppose doing something like that requires me to change the settings in the router and give the plug a static IP?
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  3. #33
    FLAC
    Join Date
    Jan 2008
    Location
    Dartmouth, MA
    Posts
    916
    I doubt that your router will have a setting for it. If you want a domain name to be known to all devices on the network, you would have to set up your own DNS server on the network. The router might have one built in, but I have my doubts on whether there is a way to put your own values into it. The router, will definitely have a DHCP server in it, the DHCP server informs all of the computers on the network what they should use as an ip address, the subnet mask, the gateway, and the dns servers. Remember how I said before that companies have their own DNS servers? You can set up the sheeva plug as a DNS server, then set it as the DNS server in the router and restart/reconnect all devices using the router. From then on, all the devices would look to the sheeva for a list of addresses and would see any custom addresses you put in.

    If the sheeva is a server of any sort, it should definitely have a static IP.

    There might be a way to do this by using the OpenDNS service. I'll check it out when I get home.
    My Nearly Complete Car:
    http://www.mp3car.com/vbulletin/show...ed-car-pc.html

    Micro Control Center... Control Your Car Across the Internet
    http://www.mp3car.com/fusion-brain/1...-internet.html

    Website: (It's a work in progress, really. All my projects have taken me from ever really developing it.)
    http://paulfurtado.com/

  4. #34
    FLAC
    Join Date
    May 2006
    Location
    Calgary, Alberta
    Posts
    1,718
    The plug will always have a static local IP which you can use if you're trying to run it from the local network, and as long as you don't keep plugging/unplugging devices into this network causing the IP to get rearranged.

    After that you can set up bind9 to completely manage your DNS for you locally on top of Apache.
    Ampie Case
    2.5" Hard Drive 80GB Samsung 5400RPM
    256 MB DDR2 PC5400
    Xenarc 700TSV - VGA Monitor
    Intel D945GCLF Motherboard
    M2-ATX-HV

    2005 Honda Civic

  5. #35
    FLAC
    Join Date
    Jan 2008
    Location
    Dartmouth, MA
    Posts
    916
    How is the Sheeva connected to the internet? What other devices are on this connection? How is it all hooked up?

    There may be an easy way out of this.
    My Nearly Complete Car:
    http://www.mp3car.com/vbulletin/show...ed-car-pc.html

    Micro Control Center... Control Your Car Across the Internet
    http://www.mp3car.com/fusion-brain/1...-internet.html

    Website: (It's a work in progress, really. All my projects have taken me from ever really developing it.)
    http://paulfurtado.com/

  6. #36
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    Bugbyte, are you planning on using a router in the car too, or making the sheevaplug the center of the universe and being the router as well? If it's going to be the center of the universe for the car, you'll want to install a dhcp server and dns server on it as PaulF says. But if you give us more info we can give better advise.

    I think either way you will want to configure it to have a static IP. To do this with debian/ubuntu, edit /etc/network/interfaces and add something like

    auto eth0
    iface eth0 inet static
    address 192.168.1.12
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.11

    Until you have a dns server in the environment you are using this in, you can an entry in your hosts file to map names to IPs. I have not hacked my iphone so I don't' know if it's the same as regular OSX (but should be) but edit /etc/hosts and add

    192.168.1.12 whatever.the.name.youwanted.was

    I'm going to try pay attention to this thread and your iphone one and perhaps get a shivaplug as well since I am very interested in this as a permanent "always on" carputer and then using others to boot up when the vehicle is running (maybe using tftp even) to provide additional services.

    If anyone has info on good DC-DC power supplies to provide 3v and 5v to multiple devices please let me know. It seems you'll need a powered hub at a minimum to do anything useful with this.

  7. #37
    High Voltage blk02si's Avatar
    Join Date
    Jul 2005
    Location
    Motorcity
    Posts
    2,268
    Blog Entries
    1
    I must ask: why even bother using DNS if its a simple internal network?

    Just hit the server directly with the IP address, bookmark it in a browser.

    using direct TCP/IP will be faster than doing a DNS lookup even if it is local, since hitting the IP direct will essentially cut out a few networking steps

    Cool device BTW!!

    Also remember to open up port 80 for the server IP in your router so the iPhone can access the web server.
    Build Things, it keeps your brain busy.

    AutoPC v1 (Retired) - AutoPC v2 (in progress) - www.shocknet.us

  8. #38
    Admin. Linux loser.
    Auto Apps:loading...
    Bugbyte's Avatar
    Join Date
    Sep 2004
    Location
    Corning, NY
    Posts
    7,364
    Blog Entries
    2
    You know, mainly for the 'cool' factor. I thought it would be neat to have the Sheeva named rather than put in the IP. Also, I was worried that if I set up everything based on the I.P. that it might get rearranged at some point in the future and thus by looking up the name rather than relying on the IP, it wouldn't 'bust' stuff in the future.

    Right now the Sheeva is plugged directly in to my WiFi router. It is issued an IP from the router. Some of the computers on my network are also plugged into the router, but others access it via the WiFi connection. I haven't noticed any differences in accessing the Sheeva from A) a wired connection; B) a WiFi connection; C) a terminal program on my iPhone; D) the browser of my iPhone. All work identically.

    For in-car setup, I intend to have the following:
    1. Sheeva plug
    2. WiFi router
    3. USB hub with devices attached

    An alternate setup would use a USB WiFi dongle instead of the router.

    The Sheeva will function as the center of the car hotspot. It will:
    1. Serve web pages to the iPhone
    2. Run php (possibly java) or Perl
    3. Interact with the USB devices

    The purpose will be to allow control of and interaction with external devices from the iPhone, preferrably from a web page or simple java app.

    The Sheeva will do the work of interfacing and translating inputs and output to/from the iPhone. Effectively, it will be an iPhone server.
    Quote Originally Posted by ghettocruzer View Post
    I was gung ho on building a PC [until] just recently. However, between my new phone having internet and GPS and all...and this kit...Im starting to have trouble justfiying it haha.
    Want to:
    -Find out about the new iBug iPad install?
    -Find out about carPC's in just 5 minutes? View the Car PC 101 video

  9. #39
    Constant Bitrate
    Join Date
    Aug 2007
    Location
    Northern VA
    Posts
    135
    I think it would make the most sense to use a usb wifi dongle (and bluetooth even) instead of also having a router since it really isn't needed. You'll want to have the sheevaplug be the dhcp and dns server which are both easy to do. Once you have that setup you can use a name as well.

    I assume once the ad-hoc wifi network is in place, the sheeva can use the iphone for network access as well which would be pretty cool.

    I personally would use python before java, but perl or php should do fine as well.

    Time to order a sheevaplug and a FusionBrain for myself I think

    charles

  10. #40
    High Voltage blk02si's Avatar
    Join Date
    Jul 2005
    Location
    Motorcity
    Posts
    2,268
    Blog Entries
    1
    That's awesome, nice integration.

    I would still run static IP's assigned to specific MAC addresses, it will never get rearranged that way. It will also filter out would be war drivers from hacking your bug in the parking lot

    I however cannot deny the coolness factor with giving your CARNET server a name.
    Build Things, it keeps your brain busy.

    AutoPC v1 (Retired) - AutoPC v2 (in progress) - www.shocknet.us

Similar Threads

  1. New Frontend for Windows and Linux
    By gbr in forum Other Cool Front Ends
    Replies: 68
    Last Post: 01-21-2009, 08:55 PM
  2. What is needed to make a mac run in a car?
    By purplebluengree in forum MacCar
    Replies: 1
    Last Post: 03-11-2005, 01:05 AM
  3. Possible EPIA distro for Linux, Can we make one?
    By adamis in forum Software & Software Development
    Replies: 15
    Last Post: 02-23-2005, 05:50 PM
  4. Those running Linux from CF, how to make bootable?
    By eugenen in forum Software & Software Development
    Replies: 1
    Last Post: 11-10-2003, 12:18 AM
  5. mp3/ogg player for Linux?
    By mpfreeze in forum Software & Software Development
    Replies: 5
    Last Post: 12-16-2002, 09:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •