iptables
root@jam:~# iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 DROP 1 -- 0.0.0.0/0 0.0.0.0/0
2 ACCEPT 6 -- 150.89.233.33 0.0.0.0/0 tcp dpt:1807
3 DROP 6 -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1807
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
root@jam:~#
root@jam:~# iptables -A INPUT -s 150.89.233.33 -p tcp --dport 1807 -j ACCEPT
root@jam:~# iptables -A INPUT -p tcp --dport 1807 -j DROP
root@jam:~# iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT 6 -- 150.89.233.33 0.0.0.0/0 tcp dpt:1807
2 DROP 6 -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1807
root@jam:~# iptables -I INPUT 1 -p icmp -j DROP
root@jam:~# iptables -L -n --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 DROP 1 -- 0.0.0.0/0 0.0.0.0/0
2 ACCEPT 6 -- 150.89.233.33 0.0.0.0/0 tcp dpt:1807
3 DROP 6 -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:1807
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
Chain OUTPUT (policy ACCEPT)
num target prot opt source destination
root@jam:~#
← Go home