Vicer
V2EX  ›  问与答

strongswan 怎样才可以用 dnsmasq 作为本地 DNS 服务器?

  •  
  •   Vicer · Mar 23, 2016 · 1445 views
    This topic created in 3713 days ago, the information mentioned may be changed or developed.

    dnsmasq 监听地址 192.168.30.1

    iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -s 192.168.0.0/16 -j ACCEPT
    iptables -A INPUT -i $INTERFACE -p esp -j ACCEPT
    iptables -A INPUT -i $INTERFACE -p udp --dport 500 -j ACCEPT
    iptables -A INPUT -i $INTERFACE -p tcp --dport 500 -j ACCEPT
    iptables -A INPUT -i $INTERFACE -p udp --dport 4500 -j ACCEPT
    iptables -A INPUT -i $INTERFACE -p udp --dport 1701 -j ACCEPT
    iptables -A INPUT -i $INTERFACE -p tcp --dport 1723 -j ACCEPT
    iptables -A FORWARD -j REJECT
    iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o $INTERFACE -j MASQUERADE

    或者
    还需要添加什么规则呢?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   845 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 21:33 · PVG 05:33 · LAX 14:33 · JFK 17:33
    ♥ Do have faith in what you're doing.