LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-12-2005, 12:12 AM   #46
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30

cd /home/username/documents

./iptables.txt

sh example.txt

service iptables save

reboot


Is this OK or not????

If this is not OK, then I dont know what to do. I dont know what to say beyond this point...

I save it in /home/myusername/documents/firewall

The firewall is a Shell Script type. What do I have to do now??? Please give all the commands one-by-one. In order.

Last edited by wardialer; 02-12-2005 at 12:14 AM.
 
Old 02-12-2005, 12:16 AM   #47
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
Do I put: ./firewall ???? ./firewall.txt ???? or sh firewall????

Thats what I want to find out. Why is this complicated for gods sake.

I think it would be easier if you List the commands like from 1. to 10. in order in what to do. Please. I would like to finish this up

Last edited by wardialer; 02-12-2005 at 12:19 AM.
 
Old 02-12-2005, 12:18 AM   #48
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally posted by wardialer
cd /home/username/documents

./iptables.txt

sh example.txt

service iptables save

reboot


Is this OK or not????

If this is not OK, then I dont know what to do. I dont know what to say beyond this point...

I save it in /home/myusername/documents/firewall

The firewall is a Shell Script type. What do I have to do now??? Please give all the commands one-by-one. In order.
if the the script is named "firewall" and is in the "/home/myusername/documents" directory then what you need to do would look like this:

Code:
cd /home/myusername/documents

chmod +x firewall

./firewall

service iptables save

reboot
 
Old 02-12-2005, 12:20 AM   #49
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally posted by wardialer
Do I put: ./firewall ???? ./firewall.txt ???? or sh firewall????

Thats what I want to find out. Why is this complicated for gods sake.
you need to use the name of the file... if the file is called "firewall.txt" then you use "./firewall.txt", if it's called "firewall" then you use "./firewall", if it's called "BARNEY-THE-PURPLE-DINOSAUR.sex" then you do "./BARNEY-THE-PURPLE-DINOSAUR.sex".. get it??

Last edited by win32sux; 02-12-2005 at 12:28 AM.
 
Old 02-12-2005, 12:21 AM   #50
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
But the firewall file is a Shell Script for some reason. So what command should I do??? Should I use the command like this below EVEN if its a Shell Script???

Code:
d /home/myusername/documents

chmod +x firewall

./firewall

service iptables save

reboot
 
Old 02-12-2005, 12:24 AM   #51
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
why not??
 
Old 02-12-2005, 12:25 AM   #52
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
I did this:

cd /home/username/documents/ ENTER

No such file or directory.

Should I do it the long way or what??? Why its giving me No such File or Directory??? IAM STILL LOST I AM SORRY.

WHY IS THIS COMMAND NOT WORKING????? AM I DOING IT WRONG OR SHOULD I DO IT THE LONG WAY LIKE THIS:

d /home/myusername/documents chmod +x firewall ./firewall

service iptables save

reboot


Last edited by wardialer; 02-12-2005 at 12:28 AM.
 
Old 02-12-2005, 12:26 AM   #53
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
try "Documents" instead of "documents"...
 
Old 02-12-2005, 12:30 AM   #54
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
this is from one of your previous posts:

Quote:
drwxrw---- 14 vin001 vin001 4096 Feb 11 13:55 Documents/
you don't have a directory named "documents", you have one called "Documents"... it's NOT the same thing...
 
Old 02-12-2005, 12:31 AM   #55
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
Heres what it gave me after the ./firewall:

Code:
vin001@localhost Documents]$ ./firewall
./firewall: line 5: /proc/sys/net/ipv4/ip_forward: Permission denied
./firewall: line 6: /proc/sys/net/ipv4/tcp_syncookies: Permission denied
./firewall: line 7: /proc/sys/net/ipv4/tcp_timestamps: Permission denied
./firewall: line 8: /proc/sys/net/ipv4/conf/all/rp_filter: Permission denied
./firewall: line 9: /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts: Permission denied
./firewall: line 10: /proc/sys/net/ipv4/conf/all/accept_source_route: Permission denied
./firewall: line 11: /proc/sys/net/ipv4/conf/all/secure_redirects: Permission denied
./firewall: line 12: /proc/sys/net/ipv4/conf/all/log_martians: Permission denied
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `mangle': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `nat': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `mangle': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
/lib/modules/2.4.21-0.13mdk/kernel/net/ipv4/netfilter/ip_conntrack_ftp.o.gz: create_module: Operation not permitted
modprobe: insmod /lib/modules/2.4.21-0.13mdk/kernel/net/ipv4/netfilter/ip_conntrack_ftp.o.gz failed
modprobe: insmod ip_conntrack_ftp failed
/lib/modules/2.4.21-0.13mdk/kernel/net/ipv4/netfilter/ip_conntrack_irc.o.gz: create_module: Operation not permitted
modprobe: insmod /lib/modules/2.4.21-0.13mdk/kernel/net/ipv4/netfilter/ip_conntrack_irc.o.gz failed
modprobe: insmod ip_conntrack_irc failed
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
iptables v1.2.7a: can't initialize iptables table `filter': Permission denied (you must be root)
Perhaps iptables or your kernel needs to be upgraded.
 
Old 02-12-2005, 12:31 AM   #56
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
that's because you need to be root when you execute the script...
 
Old 02-12-2005, 12:33 AM   #57
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
Do I need to an 'su' before this whole command I just did???

I SERIOUSLY GETTING REALLY FRUSTERATED HERE.
 
Old 02-12-2005, 12:34 AM   #58
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally posted by wardialer
Do I need to an 'su' before this whole command I just did???
yes, you need to be root to execute that kinda script... it would be ridiculous if any user on the system could succesfully execute a firewall script, don't you think??
 
Old 02-12-2005, 12:35 AM   #59
wardialer
Member
 
Registered: Sep 2004
Distribution: SUSE Linux Pro 9.3
Posts: 375

Original Poster
Rep: Reputation: 30
What I mean do I have to an 'su' BEFORE the whole command you gave me or part of the command do I need to an 'su'????
 
Old 02-12-2005, 12:35 AM   #60
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 379Reputation: 379Reputation: 379Reputation: 379
Quote:
Originally posted by wardialer
I SERIOUSLY GETTING REALLY FRUSTERATED HERE.
YOUR NOT THE ONLY ONE.

;-)
 
  


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
Firewall script simcox1 Linux - Security 7 11-13-2005 12:08 PM
slackware's /etc/rc.d/rc.firewall equivalent ||| firewall script startup win32sux Debian 1 03-06-2004 09:15 PM
Firewall script help!!!! cirkut5732 Linux - Newbie 8 04-17-2003 06:09 PM
Could you look over my firewall script please... Grim Reaper Linux - Networking 8 03-26-2003 03:33 AM
Firewall script help jfall Linux - Networking 6 10-23-2002 03:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:45 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration