Score:0

IPTables Firewall Allow Acces Comand

uz flag

Hopefully someone can help. I have been struggling with this for a while.

I want to add a new firewall rule so that the private ip 192.168.0.15 to be allowed to acces the 6991, 8991 and 80 ports on the public ip 86.10.1.101, knowing the gateway is 86.10.1.10

Is this command correct?


iptables -t nat -A POSTROUTING -p tcp -s 192.168.0.15 -d 86.10.1.101 -m multiport --dports 6991,8991,80 -j SNAT --to-source 86.10.1.10
Doug Smythies avatar
gn flag
We need more information. Is this computer's external IP address 86.10.1.10? i.e. is it the gateway itself? If yes, then that command might work, but it depends on some other default policies. We would need to see your entire iptable rule set to know for sure. Also the state of `/proc/sys/net/ipv4/ip_forward`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.