Tag Info

New answers tagged

1

You can accomplish this using UFW. Enable UFW and set default incoming to deny: $ sudo ufw enable && sudo ufw default deny incoming Then you can allow specific IP's with: $ sudo ufw allow from 192.168.1.10 to any This will allow IP-address 192.168.1.10 to any port on your firewall.


0

I found the fix for it, just do : sudo rpi-update That updated the firmware, the kernel version, and whatever else was needed to make iptables work, now my fail2ban is working fine.


3

A iptables rule like this works fine *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [1:156] -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 587 -j ACCEPT -A INPUT -j REJECT --reject-with ...


2

If you're not comfortable working with the iptables commands you could use UFW instead. UFW stands for Uncomplicated Firewall and is a way esaier tool to use than iptables. Install ufw on your Raspbery Pi with: sudo apt-get install ufw After you've installed ufw you can setup the defaults with: sudo ufw default deny incoming && sudo ufw default ...


0

The simplest way of stopping the traffic is (assuming VPC is being used) by adding it to the VPC Network ACL of that instance and denying all traffic from that IP Address. One thing to remember is the deny rule number should be less than the first rule number.


0

You also forgot to mention that package forwarding should be enabled to be able to perform destination NAT. By default, it's usually off, so iptables rules will not work. It can be enabled by issuing: echo 1 > /proc/sys/net/ipv4/ip_forward


0

CentOS 7 ( Currently using in VMware for testing ) since its rock solid & very stable found after googling alot. CentOS/RHEL is more for servers. You can get CentOS/RHEL to work as a desktop but it's probably easier to use something like Fedora which is geared more for desktop users. Fedora is more unstable but if you start out with something that's ...


0

The message for the rejection may be hitting your syslog, which you can see at /var/log/messages or by using journalctl depending on your version of OpenSuSE. A key point to make here is that the firewall can block both incoming and outgoing ports, which potentially include the ephemeral ports that you (as the FTP client) need to have opened for outgoing ...


1

Your initial instinct is correct. The first rule should be "allow all packets from this source range", followed by the "meter incoming packets" rule(s). IPTABLES rules are evaluated in the order they appear, with the first match winning. The only thing I would do differently is to make the INPUT policy DROP, rather than having an explicit DROP rule at the ...


0

For blacklisting easiest way is probably to use dnsmasq Install dnsmasq $ sudo apt-get install dnsmasq and add this line to /etc/dnsmasq.conf address=/facebook.com/127.0.0.1 This will block facebook.com and all its subdomains. Note: For ubuntu see this post.


0

Here is some additional information explaining the options. http://www.freebsdwiki.net/index.php/IPFIREWALL_%28IPFW%29_Firewall


0

You have to use ip6tables instead of iptables And the foolowing command is available : ip6tables-restore and ip6tables-save


2

In addition to the existing answer. If you prefer (like I do) to use the syntax from the iptables-save and iptables-restore command ip6tables-save and ip6tables-restore can be used. The convenient part is that you can share the same rule file for iptables-restore and ip6tables-restore respectively by prefixing all the version-specific lines with -4 and -6 ...


0

Just use the command ip6tables instead of iptables. In most (all?) ways that matter, it works the same.


0

This is a ruleset that may do what you want. (Modified from a similar rule used to allow knocking on an external port. -A INPUT -p udp --dport 30000:65000 -m recent --rcheck --seconds 60 --name UPnP -j ACCEPT' -A INPUT -p upd --dport 1899 -m recent --name UPnP --remove -j DROP -A INPUT -p udp --dport 1900 -m recent ...


0

FTP works on ports 20/21; however, this shouldn't be a problem for you as a client. If you are a server and a client can't get to you then you need to open those ports through yast. Run yast firewall as root and then go to allowed services, advanced, and then add in the ports. If you really want to you can use iptables, but the rules on OpenSuSE are a ...


-1

Theses commands did the trick: firewall-cmd --permanent --zone=trusted --add-interface=docker0 firewall-cmd --permanent --zone=trusted --add-port=4243/tcp


0

I have solved this issue and wanted to post the answer here in case anyone else had the same difficulties as the documentation on Oracle's Website is incomplete. We need to open a port for the mountd service. To do this, issue the following commands: firewall-cmd --permanent --zone=<zone> --add-service mountd Make sure to enter your zone name. ...



Top 50 recent answers are included