how to check if you have open port gateway linux


you can use nmap to test open port gateway see below

https://nmap.org/nsedoc/scripts/ip-forwarding.html

or you can use nping as follows

 

# nping --icmp --dest-mac [gateway mac] [target ip]

You can find your router’s mac in your local ARP cache:

$ arp -v [gateway ip]