Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds a `veth(NAME)` config call which creates a pair of connected veth devices, one in the default namespace and the other one on the router namespace, both with the same name. This can be used, for example, to create interfaces on the host for VMs with the traffic routed through a mxrouter instance. Example: interface('vlan.irouter'); ip('vlan.irouter','172.19.141.2/24'); route('default','172.19.141.1'); veth('veth.variation'); my $NET_VARIATION = '172.19.118.0/24'; ip('veth.variation', '172.19.118.1/24'); my $NET_WISNET='141.14.16.0/20'; rule('filter','FORWARD',"-m state --state ESTABLISHED,RELATED -j ACCEPT"); rule('filter','FORWARD','-p icmp --icmp-type 8 -j ACCEPT'); # ping rule('filter','FORWARD',"-d $NET_VARIATION -j variation-out"); rule('filter','variation-out',"-s $NET_WISNET -p tcp --dport 22 -j ACCEPT"); # ssh rule('filter','variation-out',"-j DROP"); rule('filter','FORWARD',"-j ACCEPT");
- Loading branch information