LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-23-2009, 08:21 AM   #1
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429
Blog Entries: 2

Rep: Reputation: 30
Routes settings


Hello,

I have some customized routing settings. In Slackware, where is the standard place to put them?

Also, when I want a service to run automatically on startup, what the procedure?

Thanks,
Murock

Last edited by Murdock1979; 04-23-2009 at 08:26 AM.
 
Old 04-23-2009, 09:20 AM   #2
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
One simple solution is to put the "route add ...." commands in /etc/rc.d/rc.local

The same goes for starting a service at boot time.
If it is an existing service (say like ntpd), there will be a /etc/rc.d/rc.ntpd that you should just make executable with
Code:
chmod +x /etc/rc.d/rc.ntpd
If it is a service you installed yourself, put the command to start it in /etc/rc.d/rc.local
 
Old 04-23-2009, 02:48 PM   #3
+Alan Hicks+
Member
 
Registered: Feb 2005
Distribution: Slackware
Posts: 72

Rep: Reputation: 55
Probably the best place to put all this is in /etc/rc.d/rc.local; however, if some of your network services require these routes to be present when they are activated, things could get out of sync. This usually isn't a problem with self-installed services called from rc.local, because you can add the route statements to rc.local before calling those services. If for some reason, you have to have these services running before one or more of the services included with Slackware starts, you'll need to add the route earlier. Perhaps the best place is in rc.firewall. You can add those rules there just before calling your custom firewall (if one exists on the machine) and they'll be present before any network services are started.
 
Old 04-23-2009, 02:53 PM   #4
Murdock1979
Member
 
Registered: Oct 2003
Distribution: Slackware Debian VectorLinux
Posts: 429

Original Poster
Blog Entries: 2

Rep: Reputation: 30
Hello!

Thanks, I'll need to track the rc files. Debian and others use a different convention, so it takes a bit getting used to.

I was just wondering my Slackware system does not have an rc.firewall script in /etc/rc.d.

Is it supposed to be installed by default? Where do I get it?

Thanks,
Murdock
 
Old 04-23-2009, 03:00 PM   #5
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
The rc.firewall script does not come with the default installation, but if it exists and is executable, it will be run by rc.inet2:
Code:
# If there is a firewall script, run it before enabling packet forwarding.
# See the HOWTOs on http://www.netfilter.org/ for documentation on
# setting up a firewall or NAT on Linux.  In some cases this might need to
# be moved past the section below dealing with IP packet forwarding.
if [ -x /etc/rc.d/rc.firewall ]; then
  /etc/rc.d/rc.firewall start
fi
Alien Bob has a nice script to create a basic firewall to start with here.
 
  


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
Static routes using routes/ifroutes-eth-id.. files and default gateway disabled TimtheEagle Linux - Networking 0 05-31-2008 07:08 PM
Routes Obie Linux - Networking 16 04-28-2005 10:15 PM
routes himyuza *BSD 6 08-03-2004 10:41 AM
I need some routes |Drakehash| Linux - Newbie 1 06-08-2003 12:22 AM
I need some routes |Drakehash| Linux - Networking 1 06-07-2003 02:36 PM

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

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