einfaches NAT für ppp über wlan

---

auf dem router:
cat start_nat.sh
iptables –flush # Flush all the rules in filter and nat tables
iptables –table nat –flush
iptables –delete-chain # Delete all chains that are not in default filter and nat table
iptables –table nat –delete-chain

# Set up IP FORWARDing and Masquerading
iptables –table nat –append POSTROUTING –out-interface ppp0 -j MASQUERADE
iptables –append FORWARD –in-interface wlanx -j ACCEPT # Assuming one NIC to local LAN

echo 1 > /proc/sys/net/ipv4/ip_forward # Enables packet forwarding by kernel

auf dem NAT-client:
ip route del default
ip route add default via ip dev wlanx

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>