internet forwarding...

Alexandros Papadopoulos apapadop at cmu.edu
Sun Jan 11 22:49:42 EET 2004


On Sunday 11 January 2004 12:41, manolis wrote:
> Geia sas paidia,,,
>
> Exw mia erwtisi gia iptables....
>
> To pc mou einai mandrake linux rithmismeno se static ip 192.168.1.200
> (eth0) exei internet gateway ena windowsxp pc sto 192.168.1.1.

Ara to gateway sou (to mhxanhma pou syndeei to topiko sou diktyo me to 
Internet) trexei WindowsXP kai exei IP 192.168.1.1. Swsta?

> Sto linux pc exw local DNS caching server...
> Mexri edw ola douleboun kala....
> Sto linux pc mesw virtual network card (usbnet) einai sindemeno ena
> ipaq ( familiar linux 0.7.2 kernel 2.4.19
> To ipaq to sikwnw me static ip 192.168.0.202 (usb0 sto ifconfig)
> h epikinwnia metaksi to linuxpc kai tou ipaq einai mia xara... to
> ipaq sindeetai gia paradeigma kanonika se local (sto linuxpc) ftp
> server. Mporei akomi na kanei name resolve gia ekswterika IPs
> eksaitias tou local DNS server pou exw sto linuxpc... p.x kanontas
> ping sto www.yahoo.com briskei to ip tou site se noumero kanonika...
> edw arxizei to problima....
> den iparxei traffic... diladi den mporei na xrisimopoihsei san
> internet gateway to 192.168.1.1 oute na to dei out na tou kanei
> ping...
>
> profanws prepei na rithmisw kati me iptables (kata protimisi) wste to
> traffic apo to ipaq na ginetai forward sto gateway 192.168.1.1

Malista. Dhladh 8es to Mandrake (192.168.1.200) na kanei forward o,ti 
tou erxetai apo to Ipaq (192.168.0.202) sto gateway (192.168.1.1).

Enas tropos (an kai mallon oxi o kalyteros) einai o ekshs:

(apo http://tldp.org/LDP/nag2/x-087-2-masq.configuration.html)

Sto Mandrake kaneis ta parakatw:
# echo "1" > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -P POSTROUTING DROP
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Efoson to Mandrake milaei me Internet kanonika, kai to Ipaq milaei me to 
Mandrake kanonika, prepei na eisai ok.

-A




More information about the Linux-greek-users mailing list