Skip to content

firewall implementation and traffic forwarding #494

@p4pe

Description

@p4pe

Hello everyone, I'm trying to implement a firewall in click and I m facing an issue.
Here is a schema:
firewall

And my click configuration

//Inputs and outputs
in::FromDevice(ens4, PROMISC true)
out::ToDevice(ens5)
//c::Counter;
//Classifier

cw::Classifier(
   12/0800, //IP packets
   -       // Other
);

// IP Filtering
f::IPFilter(
 0 src host 192.168.110.0 && ip proto 1 or ip proto 17,
 1 all);
cw[0]->CheckIPHeader(14)->f;
cw[1]->Print("The packet was dropped")->Discard
in->cw;
f[0]->IPPrint("pass")->Queue->out;
f[1]->Print("Discard")->Queue->Discard;

What I want to achieve is when I ping the address 192.168.110.119, then "firewall-vnf" should route the traffic to 192.168.109.23 (i.e. VM3)

I capture the traffic using tcpdump on the output interface (ens5) but as I expected the traffic is not traversing to 192.168.109.23

What else should add to the click configuration file in order to achieve this forwarding?
Or can I do this with iptables rules on the ens5 interface;

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions