actually i am playing right now on the table...
so yes, idea to pack 1gbps adapter with all stuff and combine two x86 machines into it.
right now:
ethernet fiber-ether1:
vlan2 -> to ISP
vlan3 -> LAN(server area)
vlan5 -> pppoe_gateway
in nat i have rule for both masquarade 192.168.1.0/24(serv) and 192.168.88.0/24(pppoe)
ofcourse both are working.
BUT i need to route all traffic from vlan5 to vlan3 firstly(or) optionaly vlan4 which will be kind of external interface from pppoe to LAN.
ether1 - trunk - switch
if i set on switch for example some port to vlan3 -> works like it should
if i set on switch pppoe_gw -> pppoe works like it should ( but traffic runs directly, due to masqarade... another way did not found yet) would be appreciate for help..
why? queue tree on LAN+ISP will be maintained..
so probably last suggestion will not work
OK - I think force to vlan3 first is not really needed. I suppose the IP address of vlan2 is something public, static, and larger than /30 - e.g. 190.0.2.32/29 where .33 is the default GW, .34 is your Mikrotik, and 35 - 38 are free for you to assign to servers. This is pretty easy to do.
in NAT table, have only this rule:
/ip firewall nat add chain=srcnat out-interface=vlan2 action=masquerade
That is 100% enough to make pppoe customers and LAN reach each other without NAT translation, but for all interfaces going out Internet to be NAT translated to the Mikrotik's IP address.
Now, if you want to add a rule to translate 190.0.2.34 -> 192.168.1.10 so this server has a dedicated public IP.
Add to the srcnat chain BEFORE the one "masquerade" rule:
chain=srcnat src-address=192.168.1.10 action=src-nat to-addresses=190.0.2.34
and add this to dstnat:
chain=dstnat dst-address=190.0.2.34 action=dst-nat to-addresses=192.168.1.10
Done.
Note that the two nat rules for the server do NOT mention the port this time. This is because you want the same public IP to work both inside and outside the mikrotik's network, so you only use IP addresses for NAT in this case.
If you want to limit services that hosts may reach the server on:
add to the filter table, forward chain:
acion=accept protocol=tcp dst-address=192.168.1.10 ports=22,25,110,80,443 (for a web/mail server with ssh)
action=accept protocol=udp dst-address=192.168.1.10 ports=53
action=drop dst-address=192.168.1.10
This way, all other ports on the server are protected, but connections to the services you want to make available are OK. Notice that I used the private IP because the forward filter comes after the dst-nat action has mapped its public IP address into its private one.