Tag Info

Hot answers tagged

2

lineinfile If you want to manage rules in your iptables configuration without overwriting existing rules or centrally managing iptables in a template, use Ansible's lineinfile module: - name: ensure iptables allows established and related traffic lineinfile: dest=/etc/sysconfig/iptables state=present ...


1

Linux is designed to respond to ARP requests on any interface. It is assumed that the host owns the IP address and not the particular interface. What you are seeing is called ARP Flux. If your interfaces exist on the same Layer 2 Broadcast Domain, you will see this. You mention that you are using VLAN's which should make this not true, but that depends on ...


1

I reset iptables, then changed the line in my script that sets this specific iptables rule from this: iptables -A INPUT -s 192.168.1.3 -i eth0 -p tcp -m tcp --dport 6379 -j ACCEPT to this: iptables -A INPUT -i eth0 -p tcp --dport 6379 -s 192.168.1.3 -j ACCEPT and now it's magically working, even though iptables -L -n -v looks identical to what was ...


1

It's possible that you added the ACCEPT rule shortly after a connection attempt had taken place and been dropped by the policy. If this was the case, a connection tracking entry may have been created for the flow, which included the filtering decision. The connection tracking table acts as a sort of cache for netfilter; it doesn't evaluate all rules for all ...


1

You should first allow localhost connection and then your IP address or your network. Example: if your IP address is something like 192.168.1.20 you can allow only your IP address on the entire network. # Allow connection from localhost iptables -A INPUT -s 127.0.0.1/32 -j ACCEPT # Allow my IP address. iptables -A INPUT -s 192.168.1.20/32 -j ACCEPT # ... ...



Only top voted, non community-wiki answers of a minimum length are eligible