Vicer
V2EX  ›  问与答

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

  •  
  •   Vicer · Mar 23, 2016 · 1443 views
    This topic created in 3712 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   ·   2768 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 12:55 · PVG 20:55 · LAX 05:55 · JFK 08:55
    ♥ Do have faith in what you're doing.