# network conf after bridge setup?(ssh/apache not working)



## damarious25 (Dec 13, 2011)

- Running latest FreeBSD 
- Previously static IP, ssh, and apache22 *were* running fine 
- Box is a test box so decided to try to use it as a bridge (no DNS, DHCP or firewall. Basic straight through bridge). 
- Bridge set up last night but now can't access ssh or apache. I assume it's related to IPs and the bridge setup?

Not sure how to proceed. I want the bridge to work and be able to access ssh and apache22. I tried to leave two NICs alone and assign static IP to bridge0 but when I did in /etc/rc.conf the bridge wouldn't work. Like 
	
	



```
ifconfig_bridge0="inet 10.0.200.10 netmask 255.255.255.0"
```
200.10 is outside my router's DHCP range so no IP conflict. Then I tried to assign static IP to a single NIC but that would disable the bridge too. So right now there is no IP set in rc.conf and the bridge works.

So I read about alias and tried to set that up in rc.conf:

```
ifconfig_fx0_alias0="inet 10.0.200.15 netmask 255.255.255.252"
```
With that being only set IP in rc.conf the bridge works, and device 1 has "inet 10.0.200.15" when I *ifconfig -a* so I assume the alias is up and running. Now what? Ports are forwarded to the static IP on alias0 but ssh and apache still don't work. I tried to set apache listening address to the static IP (with port) but that didn't work either.

To be honest I'm not sure if I'm even on the right path?! Any help, advice, links to information I should read would be appreciated. -Thanks


----------



## SirDice (Dec 13, 2011)

damarious25 said:
			
		

> - Bridge set up last night but now can't access ssh or apache. I assume it's related to IPs and the bridge setup?


A bridge operates on Layer 2. IP addresses are layer 3. You have no layer 3 connectivity at this point.


Assign an IP address to the bridge and configure SSH and Apache to bind to that address.

Handbook: 32.5 Bridging


----------



## damarious25 (Dec 13, 2011)

As I said, when I try to assign the bridge an IP, the bridge fails. Also, just giving the bridge an IP causes issues with Apache and Apache won't start. I also forgot to mention that I have read the MAN pages and many online tutorials and have tried configs from all I could find. It seems the setup: one NIC with static IP and Apache is fine. But I lose my bridge.

Setup 2: with two NICs and no set IPs the bridge works but Apache doesn't.

Now in setup 2 when I try to assign IPs everything begins to fail. Assigning IPs to the bridge from 'inside and outside' my router's DHCP range fails. Just assigning NIC 1 (or 2) an IP fails. Assigning both the bridge and a NIC IPs fail (I'd thought that obvious but still tried). I've also tried creating an alias for my main NIC (with separate subnet as said in tutorials) but that also didn't work. Not really sure how else to explain it. Single NIC/Static IP = perfect. Two NICs and a bridge = perfect. Two NICs and a bridge with static IP's = fail. 

Obviously this is all human error but I've re-tried countless times and checked and re-cheked my numbers every time. I need a little help. The last thing I can think to try is to use an alias for NIC 1 and use that alias for the bridge?! Either way, I've put a lot of time into this the past few days and need a break.

Thoughts? Comments?


----------

