[afnog] mikrotik destination NAT

richard at nistechltd.com richard at nistechltd.com
Sat Jul 24 09:57:20 UTC 2010


Hi all,
Going by the interpretation I got from simeon's mail using google language tool, I assume that he is trying to setup his network such that a server on his Private network is accessible from the internet using the single public ip address on his Mikrotik router. If this assumption is correct then what he needs is dst-Nat chain and a little tweek on the src-Nat. Below is my suggested configuration.

/ip firewall nat add chain=dstnat dst-address="public ip of the wan interface of the Mikrotik" protocol="protocol used by service on the local server" dst-port="service port" action=dst-nat to-address="private ip address of the server" to-port="actual service port on server"

Depending on the version of RouterOS you have, I advise that you don't specify out-interface in the srcnat(masquerade) rule that you added on the router.

I assume that the server's default gateway is the Mikrotik router.  This should work for you.

Carl can safely help with the interpretation :d

Regards 

Dele 


"the happiest people don't necessarily have the best of everything; they just make the most of everything that comes along their way."

-----Original Message-----
From: Carl aniambossou <aniamss at gmail.com>
Sender: afnog-bounces at afnog.org
Date: Sat, 24 Jul 2010 10:17:19 
To: Oluwaseun Ojedeji<seun.ojedeji at gmail.com>
Cc: <afnog at afnog.org>
Subject: Re: [afnog] mikrotik destination NAT

Simeon

Bien vouloir préciser de quel type d'accès à ta machine tu souhaiterais avoir

mettre des services en ligne

Avoir accès à l machine elle meme.


 Seun,

Hope your translation don't get us confused (smile)

in any case two solutions for what is asked (a clarification should be
given by Simeon)

- For public access through internet method dst-nat (like building a
forward chain on your nat with iptables) does it (services like web,
mail or other dmz-like)

- For private access (mobile workers, non public services or pc
access) through Internet  a secured option would be vpn layer 2 (PPTP)

cheers

Le 24/07/10, Oluwaseun Ojedeji<seun.ojedeji at gmail.com> a écrit :
> Thanks Carl, Yes you are right i sure got it the other way round (when i
> read the translated version and thought about my interpretation of it; it
> sounded too simple to be posted but i just thought who cares i have also
> asked such layman question one time or the other). All that being said,
> Simeon if you are accessing your system remotely i will suggest you use the
> "secure way" by seting up a VPN (PPTP).
>  Here is an helpful link: http://gregsowell.com/?p=680
>
> Ok let me do google translate again:
> Merci Carl, Oui vous avez raison, je vous dois c'est l'inverse (quand j'ai
> lu la version de traduction et de la pensée de mon interprétation de
> celui-ci, il semblait trop simple pour être posté, mais je viens de penser
> qui se soucie J'ai également demandé à ces question laïque un moment ou
> l'autre). Cela étant dit, Siméon si vous accédez à votre système à distance,
> je vous suggérons d'utiliser la manière "sécurisée" par Seting en place un
> VPN (PPTP).
> Voici un lien utile: http://gregsowell.com/?p=680
>
> Regards
>  2010/7/24 Carl aniambossou <aniamss at gmail.com>
>
> > Hi Seun
> >
> > Not sure you got Simeon right
> >
> >
> > Nous voulons donner acces a une machine dans le reseau local pour que
> > l'on y accede de l'exterieur.
> >
> > this means : We would like to give access to a machine in our LAN so
> > as to give access from outside.
> >
> > He would like to give access from the internet to one of his machine
> > in his LAN network , not the other way which is just a NAT done in
> > mikrotik by masquerade.
> >
> > I think this is done by dst-nat.
> >
> >
> >
> > Le 23/07/10, Oluwaseun Ojedeji<seun.ojedeji at gmail.com> a
> écrit :
> >
> >
> >
> > >
> > > Salut,
> > > Je l'ai fait avec Google Translate, j'espère qu'elle a un sens, d'après
> ce
> > > que je pouvais mettre ensemble, vous avez besoin de votre système à
> > > l'intérieur pour être en mesure d'accéder à l'extérieur de votre droit
> de
> > > réseau?
> > > Un certain nombre de choses que vous voulez vérifier, avez-vous DHCP
> > > fonctionne sur la boîte Mikrotik même? Assurez-vous d'autre l'adresse IP
> > > statique s'inscrit dans le Bloc IP affectée à l'interface locale de la
> boîte
> > > de Mikrotik.
> > > Avec tout ce que correcte, puis lancer votre winbox aller à la propriété
> > > intellectuelle>> Firewall NAT général>;
> > > Selon la chaîne scrnat choisir, sous l'adresse source mettre le bloc IP
> > > (adresse réseau) affectée à l'interface LAN. Ensuite, allez à l'action
> et de
> > > la mascarade sélectionner. Cliquez sur OK.
> > > Cela permettra à tous les systèmes d'accès derrière la boîte de Mikrotik
> à
> > > l'extérieur, pour permettre à une machine particulière, alors vous devez
> > > aller à IP> Pare-feu et d'utiliser les infirmer la déclaration exclusive
> > > ..... il d'autres façons de le faire ... c'est un seul d'entre eux.
> > >
> > > Good Luck
> > >
> > > English Version:
> > > Hi,
> > > I just did this with google translate, hope it makes sense, from what i
> > > could put together; you need your inside system to be able to access
> outside
> > > of your network right?
> > >  A few things you want to check, do you have DHCP running on the same
> > > mikrotik box? else make sure the static ip falls within the ip block
> > > assigned to the local interface of the mikrotik box.
> > > With all that correct, then launch your winbox go to IP > Firewall > NAT
> >
> > > General ;
> > >  Under chain select scrnat, inside source address put the ip
> block(network
> > > address) assigned to the LAN interface. Then go to action and select
> > > masquerade. Then click ok.
> > > This will allow all systems behind the mikrotik box access to outside,
> to
> > > permit a particular machine, then you need to go to  IP > Firewall and
> use
> > > the deny exclusive statement.....there other ways of doing this...this
> is
> > > just one of them.
> > >
> > > Good Luck
> > > 2010/7/21 Simeon Avuta <asimeon at rdc.maf.net>
> > >
> > > > Bonjour a tous;
> > > >
> > > > Nous utilisons l'outils MIKROTIK en machine virtuelle.
> > > > Nous voulons donner acces a une machine dans le reseau local pour que
> l'on
> > > y accede de l'exterieur. L'adresse de cette machine est privee (pas
> > > publique).
> > > > Nous pensions que c'est possible avec mikrotik en faisant le NAT de
> > > destination. Mais tentatives sont sans de succes jusque la. Quelqu'un a
> une
> > > idee?
> > > > Merci.
> > > >
> > > > Simeon
> > > >
> > > >
> > > >
> > > >
> > > >_______________________________________________
> > > > afnog mailing list
> > > > http://afnog.org/mailman/listinfo/afnog
> > > >
> > >
> > >
> > >
> > > --
> > >
> ------------------------------------------------------------------------
> > > Seun Ojedeji,
> > > System Analyst/Network Admin
> > > ICT Centre,
> > > University of Nigeria, Enugu Campus.
> > >  web:      http://www.unn.edu.ng
> > > Mobile: +2348035233535
> > > Email:   seun.ojedeji at unn.edu.ng
> > >             seun.ojedeji at gmail.com
> > >  Skype:  seun.ojedeji
> > >
> > >
> > >_______________________________________________
> > >  afnog mailing list
> > >  http://afnog.org/mailman/listinfo/afnog
> > >
> >
> >
> > --
> > TRINET
> > -_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
> >
> > ANIAMBOSSOU Carl
> > CEO
> >
> > MCTA (Mikrotik)
> > Wireless Expert (Mikrotik)
> >
>
>
>
> --
> ------------------------------------------------------------------------
> Seun Ojedeji,
> System Analyst/Network Admin
> ICT Centre,
> University of Nigeria, Enugu Campus.
>  web:      http://www.unn.edu.ng
> Mobile: +2348035233535
> Email:   seun.ojedeji at unn.edu.ng
>             seun.ojedeji at gmail.com
>  Skype:  seun.ojedeji
>
>


-- 
TRINET
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

ANIAMBOSSOU Carl
CEO

TRINET-LAYERS
COTONOU tel: +229 97 48 01 33 +229 98 81 72 00

REPUBLIC OF BENIN

TRINET
POINTE NOIRE +242 954 93 80
REPUBLIC OF CONGO

WEST CENTRAL  AFRICA

www.trinet-layers.com
-_-_-_-_-_-_-_-_-_-__-_-_-_-_-_-__-_-_-_-_-

_______________________________________________
afnog mailing list
http://afnog.org/mailman/listinfo/afnog


More information about the afnog mailing list