Blocking access to the outside from cloud interfaces

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
networkaddict
Posts: 3
Joined: Thu Aug 03, 2017 10:30 pm

Blocking access to the outside from cloud interfaces

Post by networkaddict » Thu Aug 03, 2017 10:34 pm

I would like to stop the devices in my Eve server from potentially being able to contact the outside world. I have two friends who use my server, and I don't want them to accidentally interact with the gear in my home network (managed Cisco router and switches.)

How can I prevent bridging to the server NIC, while still allowing HTTP access to management, and also allowing INTERNAL host communication through cloud objects (say for communicating between two separate labs?)

Thank you!

ramindia
Posts: 409
Joined: Sun Mar 19, 2017 10:27 pm

Re: Blocking access to the outside from cloud interfaces

Post by ramindia » Fri Aug 04, 2017 7:25 am

networkaddict wrote:
Thu Aug 03, 2017 10:34 pm
I would like to stop the devices in my Eve server from potentially being able to contact the outside world. I have two friends who use my server, and I don't want them to accidentally interact with the gear in my home network (managed Cisco router and switches.)

How can I prevent bridging to the server NIC, while still allowing HTTP access to management, and also allowing INTERNAL host communication through cloud objects (say for communicating between two separate labs?)

Thank you!
you can use iptables in Linux to block, or you have FW in the edge block it.

R!

Uldis (UD)
Posts: 5179
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Blocking access to the outside from cloud interfaces

Post by Uldis (UD) » Fri Aug 04, 2017 7:40 am

The best of course would be dedicate special subnet for EVE use, beside your home LAN.

How these guys accessing to your server? From Internet??


UD

networkaddict
Posts: 3
Joined: Thu Aug 03, 2017 10:30 pm

Re: Blocking access to the outside from cloud interfaces

Post by networkaddict » Fri Aug 04, 2017 2:17 pm

No, they're my room mates. They access it from the home LAN. I can carve a new subnet if I need to, but I was hoping there was a way to disable the bridging instead. Is the traffic only bridged out of the host over the pnet1 interface? pnet0 for management, pnet1 for bridging out to the real world, and the rest of the pnet interfaces for internal host communication?

Uldis (UD)
Posts: 5179
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Blocking access to the outside from cloud interfaces

Post by Uldis (UD) » Fri Aug 04, 2017 4:12 pm

you can leave only management first interface mapped for access to eve.
same time it can be disabled for internet or isolated from home lan..

UD

networkaddict
Posts: 3
Joined: Thu Aug 03, 2017 10:30 pm

Re: Blocking access to the outside from cloud interfaces

Post by networkaddict » Mon Aug 07, 2017 3:08 pm

Uldis, thanks for the reply.

Forgive me for being a bit dense, but I'm not quite understanding what you mean. What I want is to make it so that pnet0 is completely inaccessible from inside labs. I don't want to be able to create a Cloud interface linked to pnet0 AT ALL. I tried digging through the various PHP files, but could not find the exact function that creates the cloud objects (I was just going to comment it out and see if that worked.) . Do you have any suggestions for me?

Thanks again for all the hard work you guys do, we all appreciate it!

ecze
Posts: 534
Joined: Wed Mar 15, 2017 1:54 pm

Re: Blocking access to the outside from cloud interfaces

Post by ecze » Mon Aug 07, 2017 4:26 pm

Hack is possible ....

in /opt/unetlab/html/includes/functions.php line 614

replace pnet[0-9] with pnet[1-9]

Code: Select all

/**
 * Function to list all available network types.
 *
 * @return      Array                                           The list of network types
 */
function listNetworkTypes() {
        $results = Array();
        $results['bridge'] = 'bridge';
        $results['ovs'] = 'ovs';

        // Listing pnet interfaces
        foreach (scandir('/sys/devices/virtual/net') as $interface) {
                if (preg_match('/^pnet[0-9]+$/', $interface)) {
                        $results[$interface] = $interface;
                }
        }

        return $results;
}
Each update will overwritten your hack.....

E.

Post Reply