On Fri, 1 Feb 2002, m wrote:

>   Cata vreme cineva din inet incearca o legatura catre 213.x.x.x:8080
>   este trimis catre 192.168.0.10:8080.De ce nu este valabil lucrul
>   asta si cand se fac cereri catre 213.x.x.x:8080 din propriul lan?
un mic exemplu de port forwarding, cel putzin mie mi-a mers ( si din
propriul lan. ) o sa intelegi de ce.
dnat + snat + OUTPUT.

# Example of port forwarding
/sbin/iptables -t nat -A PREROUTING  -s $INT_NET/24 -d $INT_IP -p tcp --dport 23 -j 
DNAT --to-destination 192.168.0.3
/sbin/iptables -t nat -A POSTROUTING -s $INT_NET/24 -d 192.168.0.3 -p tcp --dport 23 
-j SNAT --to $INT_IP
/sbin/iptables -t nat -A OUTPUT      -s $INT_NET/24 -d $INT_IP     -p tcp --dport 23 
-j DNAT --to-destination 192.168.0.3

u`ll figure it out...

-- 
George B.
--
Linux registered user 93645
--
Only individuals have a sense of responsibility. --Nietzche

---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to 
unsubscribe from this list.

Raspunde prin e-mail lui