[SOLVED] Virtual machine without internet access (Mikrotik RouterOS)

profjvidal

New Member
Apr 23, 2020
2
0
1
39
Good afternoon.

If someone can help, have the following configuration:
- The platform is a debian 9 VPS.
- I installed the proxmox and a virtual machine with Mikrotik RouterOS, this is already configured, but has no internet.

Check out my configuration:

No debian 9(proxmox):

auto lo
iface lo inet loopback


auto ens3
iface ens3 inet static
address 185.xx.xx.100
network 185.xx.xx.0
netmask 255.255.255.192
gateway 185.xx.xx.4


post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/ens3/proxy_arp


auto vmbr0
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0

source /etc/network/interfaces.d/*.cfg

No mikrotik:
In mikrotik is already configured the route, dns and nat. Ping for ip 10.10.10.1 and 185.xx.xx.100 are working but for external, type 8.8.8.8 does not work.
 

Attachments

  • ping-mk.PNG
    ping-mk.PNG
    13.2 KB · Views: 22
  • ping-proxmox.PNG
    ping-proxmox.PNG
    26.2 KB · Views: 21
Good afternoon. Problem solved.

root@proxmox:~# nano /etc/init.d/proxmox-routing
#!/bin/sh
case "$1" in
start) echo "proxmox-routing started"

/sbin/iptables -t nat -A POSTROUTING -s 10.0.0.0/8 -o ens3 -j SNAT --to 185.xx.xx.100

/sbin/iptables -A FORWARD -s 10.0.0.0/8 -j ACCEPT
/sbin/iptables -A FORWARD -d 10.0.0.0/8 -j ACCEPT

;;

*) echo "Usage: /etc/init.d/proxmox-routing {start}"
exit 2
;;

esac
exit 0

root@proxmox:~# chmod 755 /etc/init.d/proxmox-routing
root@proxmox:~# update-rc.d proxmox-routing defaults
root@proxmox:~# /etc/init.d/proxmox-routing start
 
Hi,

Can you please make some throughput tests with the Mikrotik RouterOS? Is it using a lot of resources? What is your hardware configuration? Did you also test pfSense for comparation?

Thank you,
Rares
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!