New answers tagged

0 votes

Create an iptables rule if the rule does not already exist

check if rules exist and if not - then add it iptables -C INPUT -s 0/0 -p tcp --dport 5666 -j ACCEPT || iptables -I INPUT -s 0/0 -p tcp --dport 5666 -j ACCEPT
user avatar
  • 1
0 votes

Move iptables rule (w/o removing and adding)

Adding to the answer from Valentin Bajrami: if you have your current iptables rules and counters to a file using iptables-save -c -f /somepath/iptrules-$(date +%F) you can then modify the file with ...
user avatar
  • 113
0 votes

How to check the rules on iptables

Your rules Rule 1: Deny access to any destination port TCP 80. It can be tested by web browser. Any page having URL=http://www.some.domain must be inaccessible. Such URL uses port TCP 80. But https://...
user avatar
  • 111
0 votes

Redirecting DNS querries from NAT'd devices and UFW

Install bind9 or some other dns server that can forward requests on the Ubuntu box, and point the Fedora's nameserver entry at the Ubuntu box's IP. The default install of bind9 on Debian and ...
user avatar
  • 4,700
0 votes

iptables: How to allow only SSH and VPN traffic?

There are several issues here. First off, you need to allow a few more things. Traffic over the VPN. It will be a specific named device, or class of named devices. If the VPN is up, you should see ...
user avatar
  • 1,099
0 votes
Accepted

iptables not blocking access via ports?

It turns out that this is working, after all. I am very, very sorry for the false alarm. I incorrectly thought that it wasn't working properly for the following reason ... I am using both postfix and ...
user avatar
  • 301
1 vote

Blocking UDP port 140 from receiving packets from source port 8989 (active way to send signal to sender that is unreachable)

/sbin/iptables -A .... If you add this rule at the end of the chain then whether it is applied depends on the entries before it in the chain. Use '-I' to put it at the start of the chain. If you want ...
user avatar
  • 4,295

Top 50 recent answers are included