| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
dhclient eth2 |
| 4 |
# provide NAT |
| 5 |
iptables -t nat -I POSTROUTING -o eth2 -j MASQUERADE |
| 6 |
# Redirect DNS to a real public server |
| 7 |
iptables -t nat -I PREROUTING -d 192.1.2.254 -j DNAT --to-destination 8.8.8.8 |
| 8 |
echo "internet uplink enabled" |