OVH Cloud OVH Cloud

dhcp et nat

1 réponse
Avatar
nathieb
Bonjour,

Je viens d'avoir ma connection free, et je remonte une passerelle.
J'ai choisi OpenBSD3.8 pour me faire la main.
1. dhcpd ne veux pas se lancer au démarrage
pourtant je vois l'ordre passé .
si je fais dhcpd -a xl1 pas de problème.
Pourtant j'ai suivi la doc







deuxième pb le nat ne fonctionne pas?
j'ai configuré le dns et les requètes passent car les requetes dns
fonctionne en récursif. (Le client récupère l'ip de www.google.fr )
par exemple.

Je pense que mon pf.conf pose problème.

# $OpenBSD: pf.conf,v 1.29 2005/08/23 02:52:58 henning Exp $
#
# See pf.conf(5) and /usr/share/pf for syntax and examples.
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
# in /etc/sysctl.conf if packets are to be forwarded between interfaces.

ext_if="xl0"
int_if="xl1"

#table <spamd> persist
#table <spamd-white> persist

#set skip on { lo $int_if }

#scrub in
#Insertion des règles du nat
nat on $ext_if from $int_if to any -> $ext_if

rdr on $ext_if proto tcp from any to any port 80 -> 192.168.1.2 port 80
rdr on $ext_if proto tcp from any to any port 443 -> 192.168.1.3 port 80

et

net.inet.ip.forwarding=1 # 1=Permit forwarding (routing) of packets
net.inet6.ip6.forwarding=1 # 1=Permit forwarding (routing) of packets

Je cherche une direction ou des commandes qui me permettrait de
débloquer la situation.

merci d'avance, je continue mes recherches ...
olivier

1 réponse

Avatar
TeXitoi
nathieb writes:

Bonjour,

Je viens d'avoir ma connection free, et je remonte une passerelle.
J'ai choisi OpenBSD3.8 pour me faire la main.


Pourquoi pas OpenBSD 3.9?

Je pense que mon pf.conf pose problème.


J'ai peut-être une idée

# $OpenBSD: pf.conf,v 1.29 2005/08/23 02:52:58 henning Exp $
#
# See pf.conf(5) and /usr/share/pf for syntax and examples.
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
# in /etc/sysctl.conf if packets are to be forwarded between interfaces.

ext_if="xl0"
int_if="xl1"

#table <spamd> persist
#table <spamd-white> persist

#set skip on { lo $int_if }

#scrub in
#Insertion des règles du nat
nat on $ext_if from $int_if to any -> $ext_if


nat on $ext_if from ($int_if) -> ($ext_if:0)

Les parenthèses réfèrent à l'adresse de l'interface et non
l'interface. :O est le premier "alias" de l'interface.

merci d'avance, je continue mes recherches ...


bonne chance.

--
Guillaume Pinot http://www.irccyn.ec-nantes.fr/~pinot/

« Si vis amari, ama. » -- Sénèque

() Campagne du ruban ascii -- contre les mails en html
/ Contre les pièces jointes Microsoft