Задача: дать доступ в инет через NAT
Роутер на базе Ubuntu 10.04
3 сетевые карты:
eth0 - смотрит в инет
eth1 - 62.16.111.1 - смотрит в сеть с реальными IP, 62.16.111.0/24
eth2 - 192.168.0.1 - смотрит в сеть , 192.168.0.0/24
net.ipv4.ip_forward = 1
настройки iptables:
iptables -A INPUT -i eth1 -j ACCEPT
iptables -A INPUT -i eth2 -j ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A PREROUTING -i eth1 -p TCP --dport 80 -j REDIRECT --to-port 3128
iptables -t nat -A PREROUTING -i eth1 -p TCP --dport 8080 -j REDIRECT --to-port 3128
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j SNAT --to-source 62.16.111.1
При таких настройках сеть 192.168.0.0/24 сидит без доступа в инет.
Почему?


Ответ на:
комментарий
от anonymous

Ответ на:
комментарий
от INDIGO

Ответ на:
комментарий
от anonymous

Ответ на:
комментарий
от INDIGO

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Похожие темы
- Форум iptables + squid = invalid URL (2013)
- Форум iptables nat (2010)
- Форум Юзеры обходят прозрачный прокси. Как решить? (2011)
- Форум iptables (2017)
- Форум Не работает прозрачное проксирование, а раньше работало (2007)
- Форум Моделирование различных видов NAT, с помощью iptables(Linux) (2015)
- Форум [iptables] проблемка (2010)
- Форум Nat+Squid3+AD не могу ограничить использование nat (2016)
- Форум Squid, IPTABLES -P INPUT DROP (2012)
- Форум iptables, проброс портов, множество сеток (2019)