---
# System prepended metadata

title: FIrewall Testbed Settings
tags: [DT, lab]

---

# Testbed Settings
![Testbed_topology](https://hackmd.io/_uploads/S1LLKN6dp.jpg)


## Server / Controller / DT platform
- IP: 10.0.0.1 (enx7cc2c635b85f)

## Switch 1
- IP: 10.0.0.2
https://hackmd.io/_uploads/S1LLKN6dp.jpg
        sudo ifconfig br0 10.0.0.2 netmask 255.255.255.0

- Port4 (enp1s0f3) -> server
    - mac: 7c:c2:c6:35:b8:5f
- Port3 (enp1s0f2) -> firewall2
    - mac: 00:05:1b:c5:a5:bd
- Port2 (enp1s0f1) -> firewall1
    - mac: 00:05:1b:c5:a5:aa
- Port1 (enp1s0f0) -> firewall3
    - mac: 54:af:97:8e:00:86

        
## Switch 2
- IP: 10.0.1.2 

- Port7 (enx2887ba4e097d) -> client2
    - mac: e4:5f:01:98:16:a4
- Port5 (enx9cebe8b1f835) -> client1
    - mac: e4:5f:01:97:a0:c2
- Port3 (enx000972836258) -> firewall2
    - mac: b8:ae:ed:72:a7:1d 
- Port2 (enp2s0) -> firewall3
    - mac: c0:3f:d5:69:8c:e0
- Port1 (eno1) -> firewall1
    - mac: c0:3f:d5:69:8f:c9 

    
        sudo ifconfig br0 10.0.1.2 netmask 255.255.255.0

## Firewall 1
- IP: 10.0.0.3 (enx00051bc5a5aa)

        sudo ifconfig enx00051bc5a5aa 10.0.0.3 netmask 255.255.255.0
- IP: 10.0.1.3 (eno1)

        sudo ifconfig eno1 10.0.1.3 netmask 255.255.255.0
        

## Firewall 2
- IP: 10.0.0.4 (enx00051bc5a5bd)

        sudo ifconfig enx00051bc5a5bd 10.0.0.4 netmask 255.255.255.0
- IP: 10.0.1.4 (enp0s25)

        sudo ifconfig eno1 10.0.1.4 netmask 255.255.255.0

## Client 1
- IP: 10.0.1.5

        sudo ifconfig eth0 10.0.1.5 netmask 255.255.255.0

## Client 2
- IP: 10.0.1.6

        sudo ifconfig eth0 10.0.1.6 netmask 255.255.255.0

### Enable Packet Forwarding


     echo "1" > /proc/sys/net/ipv4/ip_forward

### Add routing rule

    sudo ip route add 10.0.1.0/24 via 10.0.0.3 dev br0 metric 0
    sudo ip route add 10.0.1.0/24 via 10.0.0.4 dev br0 metric 1


    sudo ip route add 10.0.0.0/24 via 10.0.1.3 dev br0 metric 0
    sudo ip route add 10.0.0.0/24 via 10.0.1.4 dev br0 metric 1
    
### Find Port using 

    sudo netstat -tulpn| grep :5201
    
