raspi2807
Posts: 2
Joined: Wed Aug 27, 2014 12:58 am

setting up iptables

Wed Aug 27, 2014 1:06 am

When I type in sudo /sbin/iptables -L, I get the following.
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

But if I type sudo service iptables start, I get unrecognized service.
I assume I already have iptables installed. But how do I run iptables? There is no iptables under /etc/init.d/

User avatar
jojopi
Posts: 3636
Joined: Tue Oct 11, 2011 8:38 pm

Re: setting up iptables

Wed Aug 27, 2014 6:16 am

Assuming you are running Raspbian, and know what iptables rules you want, just "sudo apt-get install iptables-persistent". Then put your rules in /etc/iptables/rules.v4 and they will be loaded at boot.

Otherwise, what kind of firewall or routing are you trying to achieve?

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: setting up iptables

Wed Aug 27, 2014 6:32 am

apt-get install fwbuilder
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

raspi2807
Posts: 2
Joined: Wed Aug 27, 2014 12:58 am

Re: setting up iptables

Wed Aug 27, 2014 7:28 am

Thank you. It is working. I just want to secure the system with firewall.

Return to “Beginners”