LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-22-2006, 09:36 PM   #1
martincho
Member
 
Registered: Sep 2004
Location: Argentina
Distribution: Debian 10.0
Posts: 37

Rep: Reputation: 15
Start up script


Hi All,.

I'm trying to migrate a "router" from Slackware to Debian.
And had a problem:
Want to configure the 2 interfaces to the internal network and make them "up" automatically.
Also has some simple iptables rules.

In Slack I created the "rc.local" with all the commands, simple and functional.

Now with Debian can't find the way just because it's not a "rc.d"...are rc0.d, rc1.d, rc2.d, rc3.d, ....etc. So, don't know in which one put the file.

How can I make the interfaces configure and go up automatically?

Regards
 
Old 06-22-2006, 09:48 PM   #2
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
debian has a "rc.local" file in /etc/rc.local
also if you look in "/etc/network/interfaces" you can make interfaces start on boot using "auto"
Here's my /etc/network/interfaces file:
Quote:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth1
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
broadcast 192.168.0.255

iface eth1 inet dhcp

auto eth0

auto eth1
the hotplug part is because my cable modem is connected by USB.
 
Old 06-23-2006, 09:47 AM   #3
martincho
Member
 
Registered: Sep 2004
Location: Argentina
Distribution: Debian 10.0
Posts: 37

Original Poster
Rep: Reputation: 15
Hi, many thanks for the answer. Now can bring Up the eth1 with static IP address.

Problem now is to find a solution to make the other computers from the internal network, connected to this eth1, to receive an IP address and navigate.

Also need some iptables rules.
 
Old 06-23-2006, 10:39 AM   #4
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
do you want to use DHCP to assign IP addresses, DNS...? If so then you'll want the dhcp3-server package, you could also get gdhcpd which is a GUI to configure it.
As for the iptables rules, it depedns what you want to do with it, firewall, nat...?
 
Old 06-23-2006, 06:45 PM   #5
martincho
Member
 
Registered: Sep 2004
Location: Argentina
Distribution: Debian 10.0
Posts: 37

Original Poster
Rep: Reputation: 15
After create a file in /etc/init.d/ called "rc.local, and linked to /etc/rc3.d/S90rc.local, where put the iptables rules...thing seems to be start to run.
No chance to do it editing the "examples" for /etc/network/interface and no idea where is for iptables here.
Anyway now have another problem: it's not giving ip addresses to the machines connected to the box (the router), even when run manually "dhcpd"
I thought was a good idea to switch to Debian because of its good package management and stability....but if have to change everything, or have to configure three different files for three respective actions, and in order to do that have to read three manuals or take a programming course....hmm...no way! instead as can be done simpler in Slackware or even OpenBSD I think is a nonsense!
Why is so complicated in Debian?
Why are not following the "logic" as other distros do?
Really don't know "why"....but in any case I know the result: another saying that Debian is for "hackers"....come on boys...make life easier for eveybody and will see that many others will move to this good distro!

If someone there has a "how to" for a Debian Router and want to share it....is wellcome.

Regards

Martin
 
Old 06-24-2006, 10:32 PM   #6
kinghost
LQ Newbie
 
Registered: Jun 2006
Location: CHINA
Distribution: Debian GNU/Linux testing/unstable
Posts: 4

Rep: Reputation: 0
one way ,you write the script of startup software into "~.bashrc"
try it .
 
  


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
Start up script mashed Linux - Hardware 2 04-06-2006 08:25 AM
getting script to start at boot short101 Debian 2 01-24-2005 06:32 AM
Start up script... podollb Linux - Software 3 10-19-2004 04:38 PM
How to start a Tcl/Tk script by simply invoking the script file itself ? cyu021 Programming 2 10-10-2004 11:00 AM
Writing a start up script psychoholic Linux - Newbie 1 12-19-2002 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:23 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