LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-23-2006, 04:52 PM   #1
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 195

Rep: Reputation: 31
dynamic ip address of the machine in /etc/hosts


my puter (samba server/router) is using firestarter to set NAT and to set up the firewall. it gets its ip dynamically from my ISP, and the second network interface has a static ip address (192.168.1.1). at first i had the machine named localhost.localdomain, but it automatically picked up the name cab14-69.1scom.net from my ISP so i changed the name in the network file to this. i have my hosts file set as:
127.0.0.1 cab14-69.1scom.net localhost.localdomain localhost cab14-69

i think i'm having a problem configuring my /etc/hosts file correctly so that the intranet computers can ping my server with its localhosts name, cab14-69. so far no intranet computers can connect to my samba server.

i can't ping my server using "ping cab14-69", but i can ping using the ip address 192.168.1.1 or the full machine name cab14-69.1scom.net

is there a good way to get the current dynamic ip of the machine inside of /etc/hosts? or do i need to somehow alias the 192.168.1.1 ip to the server name...

thanks for the help.
 
Old 11-23-2006, 06:01 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Is the /etc/hosts file on the machine that you are trying to ping?
If so that will not be of much help. The machine that is doing the pinging must also know what cab14-69 means. So the machine that is doing the pinging must have the IP of the ping-e with name listed in its own /etc/hosts for linux and lmhosts file under Windows.

Now if the samba server cannot be seen then is the ports that make the connection to it need to be open if running a firewall. If you need to open the ports make sure they are opened only on the lan side and not to the wan side of the linux router. If firestarter opens the ports to both interfaces then anyone can get into your system from the outside. Granted samba is mauch securer than the Windows Neighborhood side but the entire network becomes viewable.

Brian
 
Old 11-23-2006, 08:35 PM   #3
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 195

Original Poster
Rep: Reputation: 31
got IT

Quote:
Originally Posted by Brian1
Now if the samba server cannot be seen then is the ports that make the connection to it need to be open if running a firewall. If you need to open the ports make sure they are opened only on the lan side and not to the wan side of the linux router. If firestarter opens the ports to both interfaces then anyone can get into your system from the outside. Granted samba is mauch securer than the Windows Neighborhood side but the entire network becomes viewable.

Brian

your right, i needed to edit the inbound traffic policy to allow connections from hosts 192.168.1.1/24 (ip addresses: 192.168.1.1 thru 192.168.1.254). But since this was on my GREEN (eth0) Ethernet adapter i thought it should be open to all traffic, as is a Las Vegas whore!

now i can connect to my shares and ping the server using aliases.

firestarter docs:
http://www.fs-security.com/docs.php
 
Old 11-24-2006, 09:35 AM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
All machines have to have the aliases defined in either /etc/hosts for Linux or lmhosts file on Windows. You can create a common one and cut paste to all. That is the only way that is simply. Other way is setup a local DNS server that all machines use to look up the IPs you defined.

Brian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Converting static IP-address to dynamic IP-address Blue_Ice Linux - Networking 3 07-20-2006 03:35 AM
Dynamic internet sharing among several hosts fillgood Linux - Networking 5 07-04-2006 05:16 AM
Dynamic IP, /etc/hosts and DNS naimslim89 Linux - Networking 3 05-23-2006 03:22 AM
what should be in the /etc/hosts file if I have dynamic ip? Niceman2005 Linux - Networking 2 03-24-2006 08:19 PM
how to get ip address, broadcast address, mac address of a machine sumeshstar Programming 2 03-12-2005 04:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration