Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 07/08/2010, à 08:53

mikaveli

pptpd port 80 forwarding

Bonjour, je suis en détresse tongue

J'ai mis en place un serveur pptpd sur un serveur OVH, mais je n'arrive pas à acceder à internet en étant connecté en tant que client ppp0.

Dans /etc/sysctl.conf, j'ai bien effectué le net.ipv4.ip_forward=1

Voici ma config iptables -L

(Je précise que dans la config /etc/pptpd.conf, j'ai mis la local-ip en 192.168.0.1)

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www ##port http ouvert
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:1723  ##port pptp ouvert


Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  192.168.0.0/24       anywhere           

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination


Ai-je oublié quelque choses ??

Merci

Dernière modification par mikaveli (Le 07/08/2010, à 09:14)

Hors ligne

#2 Le 07/08/2010, à 11:16

mikaveli

Re : pptpd port 80 forwarding

Un petit Up de mon topic pour être plus claire :

Dans /etc/sysctl.conf, j'ai bien effectué le net.ipv4.ip_forward=1

j'ouvre le port 80 : iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT

je redirige le flux sortant vers la passerelle du serveur : iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE

Ensuite, je me connecte sur le serveur pptpd et quelques secondes après, je suis déconnecté

Quelqu'un connaitrait le probleme ?

merci

Hors ligne

#3 Le 07/08/2010, à 12:10

mikaveli

Re : pptpd port 80 forwarding

Bonjour, tout d'abord, merci pour ta réponse.

J'ai essayé la config suivante, sans succès (Quand je redirige tous mon trafic avec le client MACOS, je suis déconecté quelques seconde après, et si je le ne fait pas, je reste connecté, mais mon port 80 n'est pas celui du serveur en ligne):

iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp -i eth0 -d 94.23.56.78 --dport 80 -j ACCEPT
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE

iptables -A FORWARD --match state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT  --match state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT --match state --state ESTABLISHED,RELATED -j ACCEPT

Hors ligne

#4 Le 07/08/2010, à 13:36

mikaveli

Re : pptpd port 80 forwarding

J'ai une bonne et une mauvaise nouvelle :

La config effectuée avant est bonne, mais elle ne fonctionne qu'avec des clients sous windauws...

donc serait-ce mon client d'origine MACOS qui foirerait le daemon pptpd ?

Hors ligne

#5 Le 07/08/2010, à 16:03

mikaveli

Re : pptpd port 80 forwarding

En cherchant sur le net, j'ai cru comprendre que c'est l'encryption qui fait cracher la connection des macuser, et qu'il fallait configurer le server spécialement pour la compatibilité, quelqu'un aurait la réponse ?

merci

Hors ligne

#6 Le 08/08/2010, à 22:36

jpph

Re : pptpd port 80 forwarding

je viens de tester avec un mac sur ma dedibox qui fait server pptp egalement comme toi. Chez moi ca marche...
(j arrive a faire marcher ubuntu/windows et mac os)
Par contre mon mac c'est un ibook G4 mac os 10.4.11 (commence a dater)

Peux tu poster le resultat des logs ? ( /var/log/daemon.log)

sinon je te mets ci apres mon fichier de configs :

/etc/ppp/pptp-options :

###############################################################################
# $Id: pptpd-options 4643 2006.-11-06 18:42:43Z rene $
#
# Sample Poptop PPP options file /etc/ppp/pptpd-options
# Options used by PPP when a connection arrives from a client.
# This file is pointed to by /etc/pptpd.conf option keyword.
# Changes are effective on the next connection.  See "man pppd".
#
# You are expected to change this file to suit your system.  As
# packaged, it requires PPP 2.4.2 and the kernel MPPE module.
###############################################################################


# Authentication

# Name of the local system for authentication purposes
# (must match the second field in /etc/ppp/chap-secrets entries)
name pptpd

# Optional: domain name to use for authentication
# domain mydomain.net

# Strip the domain prefix from the username before authentication.
# (applies if you use pppd with chapms-strip-domain patch)
#chapms-strip-domain


# Encryption
# Debian: on systems with a kernel built with the package
# kernel-patch-mppe >= 2.4.2 and using ppp >= 2.4.2, ...
# {{{
refuse-pap
refuse-chap
refuse-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2] authentication.
require-mschap-v2
# Require MPPE 128-bit encryption
# (note that MPPE requires the use of MSCHAP-V2 during authentication)
require-mppe-128
# }}}
# Network and Routing

# If pppd is acting as a server for Microsoft Windows clients, this
# option allows pppd to supply one or two DNS (Domain Name Server)
# addresses to the clients.  The first instance of this option
# specifies the primary DNS address; the second instance (if given)
# specifies the secondary DNS address.
# Attention! This information may not be taken into account by a Windows
# client. See KB311218 in Microsoft's knowledge base for more information.
ms-dns 8.8.8.8
#ms-dns 10.0.0.2

# If pppd is acting as a server for Microsoft Windows or "Samba"
# clients, this option allows pppd to supply one or two WINS (Windows
# Internet Name Services) server addresses to the clients.  The first
# instance of this option specifies the primary WINS address; the
# second instance (if given) specifies the secondary WINS address.
#ms-wins 10.0.0.3
#ms-wins 10.0.0.4

# Add an entry to this system's ARP [Address Resolution Protocol]
# table with the IP address of the peer and the Ethernet address of this
# system.  This will have the effect of making the peer appear to other
# systems to be on the local ethernet.
# (you do not need this if your PPTP server is responsible for routing
# packets to the clients -- James Cameron)
proxyarp

# Debian: do not replace the default route
nodefaultroute


# Logging

# Enable connection debugging facilities.
# (see your syslog configuration for where pppd sends to)
#debug

# Print out all the option values which have been set.
# (often requested by mailing list to verify options)
#dump

# Miscellaneous

# Create a UUCP-style lock file for the pseudo-tty to ensure exclusive
# access.
lock

# Disable BSD-Compress compression
nobsdcomp

Hors ligne