real IP and rfc1918 IP on the same machine - how?

Matthew Hardcastle geek at doomgeek.com
Sun Jan 25 15:16:19 UTC 2015


> On Jan 25, 2015, at 7:15 AM, John <freebsd-lists at potato.growveg.org> wrote:
> 
> hello freebsd-questions,
> 
> I have a workstation with two NICs - one wired (real IP address on a 
> /28) and one wireless, which I want to configure to use the protected 
> wireless LAN on 192.168.100.0/24. I want the internet to route through 
> real IP address, and I want access to the wireless LAN. I don't want to 
> route out to the internet through the wireless LAN, I just need to be 
> able to contact the machines within it. The wireless LAN itself has its 
> own gateway, which is not this machine but a wifi access point.
> 
> How can I configure the ath0 interface so it sees the wireless LAN but 
> doesn't break routing to the outside world on this machine? Both 
> interfaces will have static IPs. I have tried statically assigning ath0 
> (wireless interface) to 192.168.100.100 255.255.255.0 , em0 interface to 
> [real IP] and default gateway to the real IP of the gateway, but once I 
> bring the interfaces up I cannot access the real IP of the default 
> gateway.
> 
> can anyone help?
> 
> thanks,
> 
> -- 
> John 

Hi John,

The setup you’re describing is pretty standard and should “just work” when configured correctly. It sounds like you may have misconfigured one of your interfaces. The output of `ifconfig`, `netstat -rn`, and `grep ^ifconfig /etc/rc.conf` would be helpful in diagnosing your issue.

Also, I noticed you say your wired interface is a /28 but then state it’s configured as a /24. Perhaps this is your issue?

Matt


More information about the freebsd-questions mailing list