/sbin/iptables --append POSTROUTING --table nat --source \
192.168.1.0/255.255.255.0 --jump SNAT --to-source 192.168.0.13
Comanda de mai sus face SNAT. Mai poti face MASQUERADE astfel:
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
A doua comanda o poate inlocui pe prima.
Pe comp2 poti pune DNS 192.168.1.1 daca comp1 are serverul BIND pornit.
Daca nu, poti pune ca DNS serverul ISP-ului tau.

Succes!

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
marianciuc
Sent: Sunday, September 28, 2003 4:28 PM
To: [EMAIL PROTECTED]
Subject: [rlug] iptables, newbie

Buna listashi,

Am un comp1 cu RH-9 cu doua placi de retea:
-eth0 cu IP=192.168.0.13 si prin ea ies pe internet , (adica este
conectata
la un server placa de retea avind IP=192.168.0.1)

-eth1 cu IP=192.168.1.1 , la aceasta se va conecta un alt comp2 avind
              placa de retea cu IP=192.168.1.2

Ca, comp2 sa aiba acces la internet, pe comp1, in
/etc/sysctl.conf am pus  "net.ip4.ip_forward=1"

si de asemeni, tot pe comp1 am dat urmatoarele comenzi:

"iptables -t nat -A POSTROUTING -o eth1 -s 192.168.1.0/24 -j SNAT  \
--to-source 192.168.0.13"
"iptables-save >/etc/sysconfig/iptables"
"service iptables restart"

Ce nu mi-e clar, si va rog lamuriti-ma:

-E buna comanda cu iptables ? Mai trebuie ceva facut pe comp1 ?
-Ce DNS pun pe comp2 ? Cel de pe comp1, ce il am acuma ?

Please Help

Multumesc


-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV
AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate
variantele lor.
Va rugam sa luati in considerare ca exista un risc de fiecare data cand
deschideti
fisiere atasate si ca MobiFon nu este responsabila pentru nici un
prejudiciu cauzat
de virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and
variants.
Please be aware that there is a risk involved whenever opening e-mail
attachments
to your computer and that MobiFon is not responsible for any damages
caused by
viruses.


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003
 

---
Outgoing mail is certified Virus Free. Acest e-mail este clasificat ca
fiind fara virusi!
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.521 / Virus Database: 319 - Release Date: 9/23/2003
 


--- 
Detalii despre listele noastre de mail: http://www.lug.ro/


Raspunde prin e-mail lui