Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IPv4 (v6 has been disabled)
- IP Address: 192.168.0.1
- Netmask: 255.255.255.128
- Gateway: 192.168.0.250
- METRIC: 1
- IP GW Metric
- 192.168.0.0 192.168.0.250 1 # mine
- 192.168.0.0 0 # system default
- # plus some other routes that I don't think are important
- # clear existing iptables rules
- iptables -F
- iptables -X
- iptables --table nat -F
- iptables --table nat -X
- iptables --table mangle -F
- iptables --table mangle -X
- # the rest of these rules were adapted from a blog post and I don't fully understand how they work
- iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.0/24 -d 192.168.0.0/24 -p tcp --dport 80 -j ACCEPT
- iptables -t nat -A PREROUTING -i eth0 -s 192.168.0.0/24 -p tcp --dport 80 -j DNAT --to 192.168.0.250:3128
- iptables -t nat -I POSTROUTING -o eth0 -s 192.168.0.0/24 -d 192.168.0.250 -p tcp -j SNAT --to 192.168.0.1
- iptables -I FORWARD -i eth0 -o eth0 -s 192.168.0.0/24 -d 192.168.0.250 -p tcp --dport 3128 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement