Vicer
V2EX  ›  问与答

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

  •  
  •   Vicer · Mar 23, 2016 · 1451 views
    This topic created in 3717 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   ·   1009 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 22:09 · PVG 06:09 · LAX 15:09 · JFK 18:09
    ♥ Do have faith in what you're doing.