Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
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.
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??
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
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.
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??
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.