Jump to content

Recommended Posts

Posted

At home I have a fibre patch lead running between my servers and my Virgin SuperHub, I have done this because fibre can run underneath carpet edging strips without a problem as I can't really run Cat5 cables into the loft or under floors as I have before.

 

I have a MicroTik that I would like to use as it has an SFP port instead of using a Media Convertor.

 

I need to be able to have DHCP client on the SFP port of the MicroTik which I have got working.

 

But I am having trouble setting up the NAT rule with the out port as the SFP possibly because it is running as a DHCP client port with no fixed IP I am not too sure.

 

I have the Virgin Superhub in Modem only mode so the WAN IP will change occasionally (long story, just search for SuperHub and you will see why).

Posted
Hi,

 

Mikrotiks are very powerful routers but a bit fiddly if you don't know what you're doing.

 

I'll get one of my engineers to respond to you early in the week as I'm on holiday and shouldn't be on Edugeek :)

 

Thanks, You are right they are a bit fiddly :confused2:

 

 

I can't believe how easy it was to upgrade the firmware though, simply copy the file up to a specific folder, restart and that was it.

Posted

Davit2005, I have below the NAT in code, (IN my case Ether1 connects to My VM Hub in modem mode)

 

add action=dst-nat chain=dstnat dst-port=3074 in-interface=ether1 protocol=tcp to-addresses=10.10.13.4 to-ports=3074

 

If you need something like dynamic DNS then do the below.

 

/system scheduler

add comment="no-ip update every 30 minutes" interval=30m name="no-ip update" on-event=":local DDNSuser "ddnsusername"\r\

\n:local DDNSpass "*********"\r\

\n:local DDNShost "ddnshost.ddns.net"\r\

\n\r\

\n:local CURRip [/tool fetch url="http://myip.dnsomatic.com/index.html" mode=http dst-path=CURRip; :delay 1; /file get CURRip contents; /file remove CURRip]\r\

\nif ([:resolve \$DDNShost] != \$CURRip) do={\r\

\n /tool fetch url="http://dynupdate.no-ip.com/nic/update\?hostname=\$DDNShost&myip=\$CURRip" mode=http user=\$DDNSuser password=\$DDNSpass dst-path=DDNShost keep-result=no;\r\

\n /log info message=("DDNS: Updating \$DDNShost to:\$CURRip")\r\

\n }" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive start-date=may/06/2015 start-time=13:04:13

 

And for a bit more fun, running the below script will beep the Super Mario theme tune!

 

/system script

add name=mario policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive source=":beep frequency=660 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=510 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=770 length=100ms;\r\

\n:delay 550ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 575ms;\r\

\n\r\

\n:beep frequency=510 length=100ms;\r\

\n:delay 450ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 400ms;\r\

\n:beep frequency=320 length=100ms;\r\

\n:delay 500ms;\r\

\n:beep frequency=440 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=480 length=80ms;\r\

\n:delay 330ms;\r\

\n:beep frequency=450 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 200ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 200ms;\r\

\n:beep frequency=760 length=50ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=860 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=700 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=760 length=50ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=520 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=580 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=480 length=80ms;\r\

\n:delay 500ms;\r\

\n\r\

\n:beep frequency=510 length=100ms;\r\

\n:delay 450ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 400ms;\r\

\n:beep frequency=320 length=100ms;\r\

\n:delay 500ms;\r\

\n:beep frequency=440 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=480 length=80ms;\r\

\n:delay 330ms;\r\

\n:beep frequency=450 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 200ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 200ms;\r\

\n:beep frequency=760 length=50ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=860 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=700 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=760 length=50ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=520 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=580 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=480 length=80ms;\r\

\n:delay 500ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=760 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=720 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=680 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=620 length=150ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=650 length=150ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=570 length=100ms;\r\

\n:delay 220ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=760 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=720 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=680 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=620 length=150ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=650 length=200ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=1020 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=1020 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=1020 length=80ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=760 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=720 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=680 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=620 length=150ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=650 length=150ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=570 length=100ms;\r\

\n:delay 420ms;\r\

\n\r\

\n:beep frequency=585 length=100ms;\r\

\n:delay 450ms;\r\

\n\r\

\n:beep frequency=550 length=100ms;\r\

\n:delay 420ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 360ms;\r\

\n\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=760 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=720 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=680 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=620 length=150ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=650 length=150ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=570 length=100ms;\r\

\n:delay 220ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=760 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=720 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=680 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=620 length=150ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=650 length=200ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=1020 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=1020 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=1020 length=80ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=760 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=720 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=680 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=620 length=150ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=650 length=150ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=430 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=570 length=100ms;\r\

\n:delay 420ms;\r\

\n\r\

\n:beep frequency=585 length=100ms;\r\

\n:delay 450ms;\r\

\n\r\

\n:beep frequency=550 length=100ms;\r\

\n:delay 420ms;\r\

\n\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 360ms;\r\

\n\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=100ms;\r\

\n:delay 300ms;\r\

\n\r\

\n:beep frequency=500 length=60ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=60ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=580 length=80ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=430 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=380 length=80ms;\r\

\n:delay 600ms;\r\

\n\r\

\n:beep frequency=500 length=60ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=60ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=580 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 550ms;\r\

\n\r\

\n:beep frequency=870 length=80ms;\r\

\n:delay 325ms;\r\

\n:beep frequency=760 length=80ms;\r\

\n:delay 600ms;\r\

\n\r\

\n:beep frequency=500 length=60ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=500 length=60ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=580 length=80ms;\r\

\n:delay 350ms;\r\

\n:beep frequency=660 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=500 length=80ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=430 length=80ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=380 length=80ms;\r\

\n:delay 600ms;\r\

\n\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 150ms;\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=510 length=100ms;\r\

\n:delay 100ms;\r\

\n:beep frequency=660 length=100ms;\r\

\n:delay 300ms;\r\

\n:beep frequency=770 length=100ms;\r\

\n:delay 550ms;\r\

\n:beep frequency=380 length=100ms;\r\

\n:delay 575ms;"

Posted

I have given inbound NAT there, from your first question I think you may of actually been after outbound NAT for LAN to WAN? If so then do below.

 

/ip firewall nat

add action=masquerade chain=srcnat out-interface=sfp1

 

Let me know if you need anything else.

 

Dan

  • Thanks 1
Posted (edited)
I have given inbound NAT there, from your first question I think you may of actually been after outbound NAT for LAN to WAN? If so then do below.

 

/ip firewall nat

add action=masquerade chain=srcnat out-interface=sfp1

 

Let me know if you need anything else.

 

Dan

 

Big thanks for your help. I'll have another go but probably won't be till weekend now :-) .

 

Yes, Correct I am after LAN to WAN NAT'ing so I can use the MicroTik like a Router with built in switch. Don't know why but my trusty old Draytek does not like talking to my Fibre media convertor no matter what I set or force the port mode to :confused2: . com

Edited by Davit2005
Posted
Thanks Dan :)

 

He is one of our engineers BTW :)

 

Thanks to both for your help, got NAT working as intended.

 

Jus got to sort out the firewall part of it now. It is only a perimeter firewall and there are no clients on there.

 

I was pulling my hair out a bit because I couldn't access my network remotely until I realized the DynDNS was set to the interface of my inner firewall (Sophos UTM) by default instead of using web which meant it was publishing a Private IP :doh:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...