LinuxQuestions.org
Register a domain and help support LQ
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 02-07-2005, 05:00 PM   #1
Qis
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Rep: Reputation: 0
Start DHCPd and configure iptables on boot (Debian Sarge)


Hi all,

To experiment a little with Debian I've installed a laptop with Sarge.

Playing around with this I've run into two problems, hope some(one) of you can help me out.

On my server I'm running Debian Woody which has a script /etc/init.d/iptables. I use that script (/etc/init.d/iptables save_active) to save and load my iptables at boot.

The Sarge installation doesn't seem to have this script, what is the right way to save the iptables so they will be invoked when rebooting?

Second problem:
my DHCPd won't start at boot... There is a script in /etc/init.d called dhcp, running this script with start as parameter works fine.
There's also a link to that script in /etc/rc*.d:
Quote:
debbitop:/etc# find rc*.d -name "*dhcp*" -exec ls -l {} ";"
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc0.d/K20dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc1.d/K20dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc2.d/S20dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc3.d/S20dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc4.d/S20dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc5.d/S20dhcp -> ../init.d/dhcp
lrwxrwxrwx 1 root root 14 Feb 7 17:05 rc6.d/K20dhcp -> ../init.d/dhcp
Hope some can help me out

Regards, Chris

Last edited by Qis; 02-08-2005 at 01:21 PM.
 
Old 02-08-2005, 02:15 PM   #2
Qis
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
The iptables problem is solved, just implemented the script Woody uses.

Any suggestions on the DHCPd though?
 
Old 02-09-2005, 08:01 AM   #3
Qis
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
I've found the problem with the DHCP, but have no idea how to solve it.

It's unable to start because the interface (eth1) doesn't have an ip (yet) when the DHCP tries to start.
Quote:
dhcpd: receive_packet failed on eth1: Network is down
dhcpd: No subnet declaration for eth1 (0.0.0.0).
dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
dhcpd: network segment to which interface eth1 is attached.
dhcpd: exiting.
Any suggestion?
 
Old 03-01-2005, 11:23 AM   #4
HellSpawn
Member
 
Registered: Jan 2005
Location: Venezuela
Distribution: Ubuntu 5.10 64bits
Posts: 81

Rep: Reputation: 15
So....

Did you try to give eth1 an IP address??
 
Old 03-01-2005, 02:59 PM   #5
Qis
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
The problem is that /etc/network/interfaces is loaded after DHCPd is started.

So when the DHCPd starts eth1 doens't have an IP yet.
 
Old 03-01-2005, 07:18 PM   #6
HellSpawn
Member
 
Registered: Jan 2005
Location: Venezuela
Distribution: Ubuntu 5.10 64bits
Posts: 81

Rep: Reputation: 15
Could you paste the content of your /etc/rc.d/rc3.d or rc5.d/

I think the # of the S file (S#dhcpd) have to be bigger than the # of S#network, you can rename this links without trouble...

Another solition could be to inlcude:

/etc/init.d/network start

at the begining of your /etc/init.d/dhcpd script, or maybe just an ifconfig command.

AND,

You can always call:

/etc/init.d/dhcpd start

from the rc.local script

Last edited by HellSpawn; 03-01-2005 at 07:20 PM.
 
Old 03-02-2005, 06:34 AM   #7
Qis
LQ Newbie
 
Registered: Feb 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Thumbs up

Thanks increasing the number of /etc/rc?.d/S20dhcp was a solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Configure RTL8169 in Debian Sarge jaccon Linux - Hardware 1 06-14-2005 09:40 PM
iptables and syslogd on debian sarge partiallynothin Linux - Software 1 02-23-2005 10:26 AM
[Iptables] Debian sarge, can't run script wesleywest Debian 7 01-25-2005 04:03 PM
No ping (in/out) using iptables on Debian sarge-sid bureado Linux - Security 2 02-12-2004 02:07 PM
How to start dhcpd at boot up jkcunningham Linux - Networking 8 11-21-2002 10:31 AM


All times are GMT -5. The time now is 04:44 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration