Salut,
J’ai chez moi un serveur web (lamp) connecte au travers d’un VPN
Serveur VPN <—> BOX internet <—> Serveur web
Le problème c’est qu’une fois connecte au VPN je ne peux plus accéder a mon serveur.
Idéalement je souhaite pouvoir me connecter sur mon serveur web a partir de l’ip du VPN (je ne souhaite pas que tout le monde connaisse mon ip publique).
Quelqu’un sait comment renvoyer le trafic du serveur vpn vers mon serveur web (apache2)?
Pour info voila les iptables :
Cote serveur web (client vpn)
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 192.168.3.0/24 anywhere ctstate NEW /* Block traffic from clients to eth0 */ reject-with icmp-port-unreachable
ACCEPT all -- 192.168.3.0/24 anywhere ctstate NEW /* Allow only traffic from clients to tun0 */
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere /* Use VPN IP for eth0 */
MASQUERADE all -- anywhere anywhere /* Use VPN IP for tun0 */
Cote serveur VPN
# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:openvpn
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
# iptables -L -t nat
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- 10.8.0.0/24 anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination