#!/bin/bash

# Predavani mezi rozhranimi
#iptables -A FORWARD -i eth1 -o eth0 -m state --state NEW, ESTABLISHED, RELATED -j ACCEPT
#iptables -A FORWARD -i eth0 -o eth1 -m state --state NEW, ESTABLISHED, RELATED -j ACCEPT
 
# Load the NAT module (this pulls in all the others).
#modprobe iptable_nat

# In the NAT table (-t nat), Append a rule (-A) after routing
# (POSTROUTING) for all packets going out ppp0 (-o ppp0) which says to
# MASQUERADE the connection (-j MASQUERADE).
#iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

# Http over proxy redirecting
#iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
#iptables -t nat -A PREROUTING -i wlan0 -p tcp --dport 80 -j REDIRECT --to-port 3128
#iptables -t nat -A PREROUTING -i wlan1 -p tcp --dport 80 -j REDIRECT --to-port 3128

# Turn on IP forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

