[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re:



Jak podają anonimowe źródła, przepowiedziano, że Marek Adamski napisze:

> >>>> Robisz w Apachu:
> >>>> Listen 192.168.0.1:2000 #Czyli ip i port
> >>>> IPTABLES:
> >>>> iptables -t nat -A PREROUTING -s 192.168.0.xxx -p tcp -j REDIRECT
> >>>> --to-ports 2000
> >>> IMO troche malo :) a gdzie adres :)?
> >>> wpisuje www.onet.pl i po prostu wejdzie na port 2000 onetu i nic mu
> >>> sie nie wyswietli :D
> > nie no zaraz, ktos wpisuje w przegladarke adres onetu.
> > dla przykladu:
> > 192.168.0.1:3455 ->> 213.180.130.200:80
> > bez podmiany DNAT adresu IP zostanie przekierowany pod adres:
> > 192.168.0.1:3455 ->> 213.180.130.200:2000
> > a tam nic nie slucha a juz na pewno nie to co chcemy :]
> > trzeba oprocz portu zmienic nr ip
> > 192.168.0.1:3455 ->> 192.168.0.1:2000

REDIRECT zmienia IP na lokalne.

man iptables -> REDIRECT

"REDIRECT
This target is only valid in the nat table, in the PREROUTING
and  OUTPUT  chains,  and  user-defined chains which are only
called from those chains.  It alters the destination IP address 
to send the packet to the machine  itself [...]"

[...]

Pozdrawiam

-- 
Jacek Kawa    **I've heard it said that God answers every question,
            it's just that most of the time his answer is 'no'.[dS]**



Reply to: