0

Using Linux Mint 17 and logged in as root...

When I enter the command

more /etc/sysconfig/iptables

I get the error

/etc/sysconfig/iptables: no such file or directory

When I enter the command

iptables-save > /etc/sysconfig/iptables

I get the error

bash: /etc/sysconfig/iptables: No such file or directory

Since Mint is based on Ubuntu, I imagine it has "ufw" which I thought meant Unbuntu Firewall, but apparently it means "uncomplicated firewall" to set iptables rules. https://wiki.ubuntu.com/UncomplicatedFir...

For locate iptables, my computer shows in the terminal:

/sbin/iptables
/sbin/iptables-apply
/sbin/iptables-restore
/sbin/iptables-save
/usr/bin/iptables-xml
/usr/lib/python3/dist-packages/ufw/backend_iptables.py
/usr/lib/python3/dist-packages/ufw/__pycache__/backend_iptables.cpython-34.pyc
/usr/sbin/iptables-apply
/usr/share/iptables
/usr/share/bash-completion/completions/iptables
/usr/share/doc/iptables
/usr/share/doc/iptables/INCOMPATIBILITIES
/usr/share/doc/iptables/README.Debian
/usr/share/doc/iptables/changelog.Debian.gz
/usr/share/doc/iptables/copyright
/usr/share/doc/iptables/html
/usr/share/doc/iptables/html/NAT-HOWTO-1.html
/usr/share/doc/iptables/html/NAT-HOWTO-10.html
/usr/share/doc/iptables/html/NAT-HOWTO-11.html
/usr/share/doc/iptables/html/NAT-HOWTO-2.html
/usr/share/doc/iptables/html/NAT-HOWTO-3.html
/usr/share/doc/iptables/html/NAT-HOWTO-4.html
/usr/share/doc/iptables/html/NAT-HOWTO-5.html
/usr/share/doc/iptables/html/NAT-HOWTO-6.html
/usr/share/doc/iptables/html/NAT-HOWTO-7.html
/usr/share/doc/iptables/html/NAT-HOWTO-8.html
/usr/share/doc/iptables/html/NAT-HOWTO-9.html
/usr/share/doc/iptables/html/NAT-HOWTO.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-1.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-10.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-11.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-2.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-3.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-4.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-5.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-6.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-7.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-8.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO-9.html
/usr/share/doc/iptables/html/packet-filtering-HOWTO.html
/usr/share/iptables/iptables.xslt
/usr/share/lintian/overrides/iptables
/usr/share/man/man1/iptables-xml.1.gz
/usr/share/man/man8/iptables-apply.8.gz
/usr/share/man/man8/iptables-extensions.8.gz
/usr/share/man/man8/iptables-restore.8.gz
/usr/share/man/man8/iptables-save.8.gz
/usr/share/man/man8/iptables.8.gz
/usr/share/mime/text/x-iptables.xml
/usr/share/ufw/iptables
/usr/share/ufw/iptables/after.rules
/usr/share/ufw/iptables/after6.rules
/usr/share/ufw/iptables/before.rules
/usr/share/ufw/iptables/before6.rules
/usr/share/ufw/iptables/user.rules
/usr/share/ufw/iptables/user6.rules
/usr/src/linux-headers-3.19.0-32-generic/include/config/ip/nf/iptables.h
/usr/src/linux-headers-3.19.0-32-generic/include/config/ip6/nf/iptables.h
/var/lib/dpkg/info/iptables.list
/var/lib/dpkg/info/iptables.md5sums
/var/lib/dpkg/info/iptables.postinst
/var/lib/dpkg/info/iptables.postrm
/var/lib/dpkg/info/iptables.shlibs

I also entered sudo updatedb into the command line to no avail.

My goal is to configure the firewall to allow SSH.

  • Linux Mint uses UFW by default. You should try enabling it with sudo ufw enable. – Julie Pelletier Apr 30 '16 at 22:38
  • @Julie Pelletier But if I want to allow SSH, should I disable it? – blue-success Apr 30 '16 at 22:40
  • Why ask how to enable something you don't want? Please clarify what you want. – Julie Pelletier Apr 30 '16 at 23:55
0

Try iptables-save > dump, where dump is an iptables dump file in the current dir.

/etc/sysconfig is specific for Red Hat based distros therefore you got errors.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.