Old 26th June 2006, 01:04
Dimitriy Dimitriy is offline
Junior Member
Join Date: Jun 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default Startup script?

modprobe ipt_MASQUERADE
iptables -F; iptables -t nat -F; iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 71.231.xx.xx
echo 1 > /proc/sys/net/ipv4/ip_forward

/etc/init.d/dhcp3-server start

/etc/init.d/ispconfig_server start
1. How add comments to this file? Is it "#" or "//" or something else?

2. How to add this script to startup in Ubuntu (and other Distros...)?

3. Do you consider this a clean/proper way to run your needed processes?

I made this mini script so that I could add things to my startup without having to hassle on remembering each process and such. Also I am never worried about restarting and facing a issue where something doesnt work when something wasnt started.

Its handy for me at least.

My two cents,

PS. The script/file needs to be executable. I dont remember the exact command (something like chmod+x 0666 or something) but if anybody knows be sure to mention it here.
Reply With Quote
Sponsored Links
Old 26th June 2006, 13:07
falko falko is offline
Super Moderator
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts

Originally Posted by Dimitriy
1. How add comments to this file? Is it "#" or "//" or something else?
It's #.
Originally Posted by Dimitriy
2. How to add this script to startup in Ubuntu (and other Distros...)?
Place the script in /etc/init.d, then make it executable:
chmod 755 /etc/init.d/name_of_script
Then run this:
update-rc.d name_of_script defaults
This will add the system startup links for the script.
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote


Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29
Shell Script Need Help mphayesuk Programming/Scripts 4 27th June 2006 13:06
Firewall script ColdDoT Server Operation 1 9th May 2006 00:50
Script questions && Gentoo version hagel Feature Requests 4 7th May 2006 14:19
Location of ISPConfig startup command cchamb2 General 3 6th April 2006 01:02

All times are GMT +2. The time now is 09:27.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.