LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-25-2007, 04:27 AM   #1
penguinista
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Rep: Reputation: 0
static or DHCP?


I have a question for anyone? I am not sure how to do this but
I want to be able to use a static connection but if my ISP provides DHCP do I have to use that? I guess what I'm saying is am I forced to use DHCP?
I know it's probably a stupid question but I need to know for security reasons.

I am using DHCP now and am wondering if it would be better for me to use static connection? Or would that upset my IP?

Just need some feedback.

Thanks for all of your help.

penguinista
Fedora 7
 
Old 11-25-2007, 06:10 AM   #2
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Depending on the way your ISP has things set up on their end, you might be able to get away with statically assigning an IP which you know would have been dynamically assigned to you. That said, things could change any moment and you could be left without a working connection.

Quote:
Originally Posted by penguinista View Post
I know it's probably a stupid question but I need to know for security reasons.
What security reasons would those be?
 
Old 11-25-2007, 07:52 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
The key to this is the word "dynamic" in "Dynamic Host Configuration Protocol" (DHCP). The host changes the IPs as people connect and disconnect.

Trying to use a static IP won't "upset the ISP"--it just won't work.

Many ISPs offer a static IP address (extra charge). But--why would you need it?
 
Old 11-25-2007, 09:00 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Yeah, DHCP means your machine sends a request to the server (asks for a free ip address), and the server then responds by telling which IP address you can use. Dynamic means it can change, it's not same all the time -- altough the servers usually (at least those I've faced) tend to assign you the same IP if it's available that you used last time, and if it's not, then assign a new one. A static ip usually means extra payment, because it would enable you to refer to your machine (for example connect to a service on your machine, like ssh or http) easily with an ip address that would always be the same. Dynamic ip works too, but since it may change each time you reconnect, it may not be the same always, and that makes connecting to your machine's services more difficult - you need to know the current ip all the time Though a static ip doesn't mean you can run a webserver on your machine, some (many) ISPs deny you that unless you pay them extra again.

I don't see the security aspect here, could you clarify? For me a dynamic ip would be more "secure", because it changes. Nevertheless the information is always at the server, and can easily be logged, so even if you used static or dynamic ip, it wouldn't be any more or less secure. If you want to refer to your own machine (from the machine itself), you don't need a static ip, there's the loopback device which is 127.0.0.1. From outside there's no difference if the ip of your machine is static or dynamic, except that it either is or is not the same all the time.
 
Old 11-25-2007, 09:17 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by pixellany View Post
Trying to use a static IP won't "upset the ISP"--it just won't work.
That's not an entirely accurate statement. I've actually done this myself several times in the past and I can assure you it did work. Keep in mind that even if one has a DHCP-assigned address, that doesn't necessarily mean your IP is gonna be changing very often. I've had boxes where the DHCP-assigned IP has remained the same for well over a year. As I said, it all depends on how your ISP has things set up. Indeed, on some ISPs (perhaps even most - I don't know) it "won't work" as they can have, for example, a setup where if your IP doesn't appear as having been actually leased to you, it won't get routed. So in cases such as that you will of course have to use DHCP by force. But whether or not (and for how long) a staticly set IP will work in the OP's case can only be determined by him through trial and error.


EDIT: Just to be clear: I am not recommending that this be done. I'm basically just saying that it's technically possible for it to be done in some cases. My general recommendation is that if the OP needs a static IP, then a static IP should be purchased. I can't really be any more specific because, just like you guys, I have no idea what the OP is trying to achieve with this and I also don't know what security implications he is referring to.

Last edited by win32sux; 11-25-2007 at 10:52 AM.
 
Old 11-25-2007, 11:26 PM   #6
penguinista
LQ Newbie
 
Registered: Nov 2007
Posts: 3

Original Poster
Rep: Reputation: 0
security?

Sorry guys! I just was wondering whether or not DHCP is more secure than
static IP? That's all - I should have been more clear.

Thank you all for your help,

Penguinista
 
Old 11-26-2007, 12:54 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by penguinista View Post
Sorry guys! I just was wondering whether or not DHCP is more secure than
static IP? That's all - I should have been more clear.

Thank you all for your help,

Penguinista
I don't know why there would be a security difference.

For win32sux;
Yes, you can in fact set the static IP to the one assigned by DHCP. For the reasons you state, it is fragile. I obviously should have said something like "won't work reliably "
 
  


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
From DHCP to static IP. dave`2005 Slackware 3 08-22-2005 09:12 AM
Using DHCP with a static IP ninmonkeys Linux - Networking 9 11-30-2004 07:32 AM
FC2 Overriding static if in favor of dhcp system set for static pkraus109 Linux - Networking 8 09-21-2004 11:13 AM
DHCP to static IP ?? davepal Linux - Networking 1 04-21-2004 09:34 AM
DHCP or Static Culbert Linux - Networking 1 03-14-2003 07:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:20 AM.

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