iptables

作者: Jelif | 来源:发表于2019-01-22 08:21 被阅读5次

    This is the firewall tool in Linux.

    The default table it uses is filter.

    To empty a table:

    iptables -t nat -F

    To list all rules in a table:

    iptables -t nat -L -n

    Forward packet

    iptables -t nat -A PREROUTING -d 192.168.0.110 -p tcp --dport 80 -j DNAT --to-destination 192.168.0.105
    iptables -t nat -A POSTROUTING -d 192.168.0.105 -p tcp --dport 80 -j SNAT --to 192.168.0.110

    Other options

    -i can be used to identify the input network interface.
    -j can be used to identify the output network interface.

    相关文章

      网友评论

          本文标题:iptables

          本文链接:https://www.haomeiwen.com/subject/yhikjqtx.html