V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
cloa
V2EX  ›  问与答

想请教一下关于 iptables 的问题!

  •  
  •   cloa · Aug 31, 2018 via iPhone · 1750 views
    This topic created in 2804 days ago, the information mentioned may be changed or developed.
    我想使 android 热点特定的客户机只能访问特定的目标 ip,通过 iptables 怎么实现呢!

    假如让 ip 为 192.168.43.5 的机器只能访问 ip:8.8.8.8 的服务器
    1 replies    2018-08-31 21:55:16 +08:00
    lengjian
        1
    lengjian  
       Aug 31, 2018
    iptables -A OUTPUT -s 192.168.43.5 -d 8.8.8.8 -j ACCEPT
    iptables -A OUTPUT -s 192.168.43.5 -j DROP
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4770 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 01:09 · PVG 09:09 · LAX 18:09 · JFK 21:09
    ♥ Do have faith in what you're doing.