I am trying to configure a Mikrotik router as follows:
- I have Internet connected to ether1 port where I get an IP address using DHCP client.
On the router, configure the VPN client (ovpn) - interface (ovpn-out1)
I'm adding an interface (ovpn-out1) to the masquerade
Code: Select all
ip firewall nat add chain=srcnat out-interface=ovpn-out1 action=masquerade
Choosing the ovpn-out1 interface
Code: Select all
ip dhcp-client set ether1 default-route-distance=10
Code: Select all
ip dhcp-client set ether1 default-route-distance=1
I tried to do it as follows
I remove the ether3 interface from the bridge, create a new bridge2 to which I add the ether3 interface
Next
Code: Select all
routing table add name=mark_WAN1 fib
routing table add name=mark_VPN fib
ip firewall mangle add chain=prerouting in-interface=bridge action=mark-routing new-routing-mark=mark_WAN1 passthrough=no
ip firewall mangle add chain=prerouting in-interface=bridge2 action=mark-routing new-routing-mark=mark_VPN passthrough=no
ip route add dst-address=0.0.0.0/0 gateway=192.168.1.1 routing-table=mark_WAN1
Code: Select all
ip route add dst-address=0.0.0.0/0 gateway=10.8.0.1 routing-table=mark_VPN
So everything works fine, the only problem is that I do not have access to the router using the IP address, I have access only via MAC.