Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-23-2003, 12:41 AM
|
#1
|
Member
Registered: Jun 2003
Distribution: Slack9, Red Hat 8.1
Posts: 117
Rep:
|
iptables start doesn't work in slack 9
in my red hat book i stole from the office it says that after you set all your iptables rules you have to restart it. You supposedly do this by typing "iptables start" however, with slack 9 i get a "Bad argument 'start'" is this not a command in slack 9 what's the deal here. i think that if that is not a standard for slack9 then it is lacking for real.
|
|
|
06-23-2003, 12:36 PM
|
#2
|
Member
Registered: Jun 2003
Distribution: Slack9, Red Hat 8.1
Posts: 117
Original Poster
Rep:
|
basically don't buy red hat 8 for dummies. I have already found like 3 other syntax errors (which are slightly important to linux) while setting up my firewall and script. What the hell is "iptables start". That command doesn't work in red hat either. in fact it is not even a command. I am guessing here that your rules are implemented as you enter them and iptables is always running. I don't mean to dog red hat here just the for dummies book, although, while i am on the subject of red hat and since everyone here is just viewing this post and noone responding, Why do i not have pico?, Why do i not have lynx? Those should definitely be standard in any linux install.
|
|
|
06-25-2003, 05:48 AM
|
#3
|
LQ Newbie
Registered: Jun 2003
Posts: 1
Rep:
|
On redhat you can use something like:
"service iptables start"
or
"/etc/init.d/iptables start"
or
"/etc/rc.d/init.d/iptables start"
where 'service' is just a wrapper for the RH init.d scripts.
On Slack you can port and "translate" the RH script or write your own.
Try if this works for you.
----------------
IPTABLES_CONFIG=<PATH>/<TO>/<YOUR_IPTABLES_CONFIG_FILE>
chains=`cat /proc/net/ip_tables_names 2>/dev/null`
# flush rules
for i in $chains; do iptables -t $i -F; done
iptables -F
# clear rules
for i in $chains; do iptables -t $i -X; done
iptables -X
# zero counters
for i in $chains; do iptables -t $i -Z; done
# reload and apply rules
grep -v "^[[:space:]]*#" $IPTABLES_CONFIG | grep -v '^[[:space:]]*$' | /sbin/iptables-restore -c
----------------
Look at RH9.0 iptables init.d script for details.
"man iptables" and "iptables --help" work on every distro ;-)
Lynx should be replaced by links (which supports html table).
w3m is the best one (at least for me), tables work fine and javascript support is under development.
The 'pine' package (which owns pico) has a non-free license, some distros don't like this (e.g. debian).
Regards
|
|
|
06-25-2003, 07:57 AM
|
#4
|
Member
Registered: Apr 2003
Location: Vancouver, BC
Distribution: Slackware, Ubuntu
Posts: 558
Rep:
|
Red Hat has that convenient 'service iptables restart' command that calls the iptables script under /etc/init.d/iptables. However, Slackware uses a different style of init scripts.
Under Slackware, It's probably easier just to have an 'iptables.sh' script that you would call from /etc/rc.d/rc.local to start iptables. When you need to restart iptables, you would do /sbin/iptables -F to flush your existing iptables rules, then run your iptables.sh script.
If you want, I can post a simple iptables script for a homeLAN internet gateway.
IPTABLES REFERENCES
Netfilter iptables home -- http://www.netfilter.org/
Frozen Tux iptables tutorial -- http://iptables-tutorial.frozentux.net/
IP masquerade HOWTO -- http://tldp.org/HOWTO/IP-Masquerade-HOWTO/index.html
SAMPLE SCRIPTS
Arno's hardened iptables script -- http://freshmeat.net/projects/iptabl.../?topic_id=151
Jay'shomeLAN iptables -- http://firewall-jay.sourceforge.net/
|
|
|
06-25-2003, 02:15 PM
|
#5
|
Member
Registered: Jun 2003
Distribution: Slack9, Red Hat 8.1
Posts: 117
Original Poster
Rep:
|
yeah the word service is missing from the red hat for dummies book. Not that that was important in making it work, i mean linux doesn't care about the syntax so why should the writers of red hat 8 for dummies, right?
They are fukkin idiots. of course i didn't realize this little syntax error in the book until today when i was talking to the unix admin at school. As for slack9, now that i know all this i think i can write my own script that will do it for me.
This linux sh|t is just way 2 cool !!!!!!
|
|
|
All times are GMT -5. The time now is 10:38 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|