D
D
Denis Sechin2017-09-17 11:23:32
System administration
Denis Sechin, 2017-09-17 11:23:32

How to disable packets via iptables?

There is a gateway to ubuntu-server, it is also a firewall. It is necessary to prohibit a certain IP from sending and receiving any packets through the external interface. I tried to do like this:

$ip -A FORWARD -s 10.40.1.250 -i $EXTERNAL -j DROP
$ip -A FORWARD -o $EXTERNAL -d 10.40.1.250 -j DROP

So:

iptables -I OUTPUT -s 10.40.1.250 -m conntrack --ctstate NEW, ESTABLISHED -j DROP

But it does not help, there is still access to the Internet. Any ideas how to block packet transmission and reception from the external interface? Thank you

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
krosh, 2017-09-17
@tamogavk

iptables -I FORWARD -s 10.40.1.250 -i $LAN_ETH -j DROP

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question