Difference between revisions of "Bridges"

From securityrouter.org, an OpenBSD-based firewall
Jump to: navigation, search
(Created page with "Below is a complete example for bridging two local interfaces with each other and sharing the same firewall rules and dhcp-server. Pay particular attention to the fact that th...")
 
Line 1: Line 1:
Below is a complete example for bridging two local interfaces with each other and sharing the same firewall rules and dhcp-server. Pay particular attention to the fact that the vr2 interface does not have any IP assigned to it.
+
Below is a complete example for bridging two local interfaces with each other and sharing the same dhcp-server and firewall rules. Pay particular attention to the fact that the vr2 interface does not have any IP assigned to it.
  
 
  firewall {
 
  firewall {
Line 25: Line 25:
 
  address 192.168.1.1/24
 
  address 192.168.1.1/24
 
  dhcp-server {
 
  dhcp-server {
range 192.168.1.20 192.168.1.80
 
 
  }
 
  }
 
  }
 
  }

Revision as of 20:41, 26 March 2014

Below is a complete example for bridging two local interfaces with each other and sharing the same dhcp-server and firewall rules. Pay particular attention to the fact that the vr2 interface does not have any IP assigned to it.

firewall {
	pass quick on lan label LAN
	pass in log quick on mgmt proto tcp to (mgmt) port {$mgmt_ports} label management
	match out on wan inet nat-to (wan:0) label NAT
	pass out quick on wan label outbound
}
interface bridge0 {
	firewall {
		skip
	}
	member vr1
	member vr2
}
interface vr0 {
	description "Internet"
	group "wan"
	dhcp-client
}
interface vr1 {
	description "LAN"
	group "lan"
	group "mgmt"
	address 192.168.1.1/24
	dhcp-server {
	}
}
interface vr2 {
	group "lan"
	group "mgmt"
}
system {
	authentication {
		user "admin" {
			password "admin"
		}
	}
	dns {
		name-server 8.8.8.8
	}
	http-server
	ssh-server
}