Fran�ois Boisson wrote:

On Wed, 30 Apr 2003 18:21:50 +0200
St�phane RATELET <[EMAIL PROTECTED]> wrote:

Bonjour � tous,

J'ai un serveur Linux woody ( noyau 2.4.18 ) connect� sur une adsl d'un cot�, et sur un micro r�seau local ( 2 poste windows/Linux Mandrake ). Je l'utilise pour deservir WEB, FTP, Mail, etc... et il me fait les translations d'adresse pour le partage de connexion ADSL internet.

J'aimerais que quand une requete sur un port arrive ( exemple 389 : MSN ),
MSN est le port 1863 (et 6901 pour le son semble-t-il)...

le serveur transfert la trame directement � un poste � l'interieur du r�seau. J'ai vu plusieurs documentation sur le net, certain font ca avec
ssh et d'autre avec ipmasqadm.
Je ne sais pas ce qui est le mieux pour mon probl�me, quelqu'un peut il me conseiller sur quel soft utiliser, voir, comment utiliser le soft efficacement.

Le transfert de port direct peut se faire sur cet exemple par iptables via
*
J'ai esssay� avec cette ligne de commande
/iptables -t nat -A PREROUTING -p tcp --dport 81 -i ppp0 -j DNAT --to-destination 192.168.1.20:80
/
J'ai install� Easyphp pour faire les tests sur un poste local (192.168.1.20), mais quand j'appel l'adresse de mon serveur en sp�cifiant le port 81 (j'ai essay� avec mozilla et IE), ben reponse comme quoi la connexion a �t� refus�. Alors que normalem�ent je devrais voir la page d'easyphp du poste client.

En regardant dans le man de IPTABLES, j'ai trouv� la fonction -L pour lister, voila ce qu'elle retourne apr�s la commande iptables ci dessus :

*/server-steph:~# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
LOG all -- 127.0.0.0/8 anywhere LOG level warning
DROP       all  --  127.0.0.0/8          anywhere
ACCEPT     all  --  anywhere             255.255.255.255
ACCEPT     all  --  localnet/24          anywhere
ACCEPT    !tcp  --  anywhere             BASE-ADDRESS.MCAST.NET/4
LOG all -- localnet/24 anywhere LOG level warning
DROP       all  --  localnet/24          anywhere
ACCEPT     all  --  anywhere             255.255.255.255
ACCEPT     all  --  anywhere             ADijon-###-#-##-##.abo.wanadoo.fr
LOG all -- anywhere anywhere LOG level warning
DROP       all  --  anywhere             anywhere

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  localnet/24          anywhere
ACCEPT     all  --  anywhere             localnet/24
LOG all -- anywhere localnet/24 LOG level warning
DROP       all  --  anywhere             localnet/24
LOG all -- anywhere anywhere LOG level warning
DROP       all  --  anywhere             anywhere

Chain OUTPUT (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             255.255.255.255
ACCEPT     all  --  anywhere             localnet/24
ACCEPT    !tcp  --  anywhere             BASE-ADDRESS.MCAST.NET/4
LOG all -- anywhere localnet/24 LOG level warning
DROP       all  --  anywhere             localnet/24
ACCEPT     all  --  anywhere             255.255.255.255
ACCEPT     all  --  ADijon-###-#-#-##.abo.wanadoo.fr  anywhere
LOG all -- anywhere anywhere LOG level warning
DROP       all  --  anywhere             anywhere
server-steph:~#

/*Si quelqu'un peux m'expliquer pourquoi marche pas, merci d'avance.*/
/*
*

iptables -t nat -A PREROUTING -p tcp --dport 1863 \
        -i ppp0  -j DNAT \
        --to <IP destination locale>:1863

�x�cut�e sur la passerelle.

ssh fait plut�t un tunnel (moins rapide mais + s�r). Il y a �galement la
solution de proxy d�di�s � des protocoles sp�cifiques.

Fran�ois Boisson

Merci beaucoup



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact
[EMAIL PROTECTED]






Répondre à