Hi All been beating my head all day and will continue to do so but hoping someone can guide me in a direction.
I am currently trying to plug an IP Cam directly into ubuntu machine that has an eth0 and wlan0 interface. I'm trying to route it so that PCs on SubnetA can access the IPCam on Subnet B. So far, I have managed to get the PCs to access eth0 on the machine but not the IP Cam.The way I did this was to:
route add -net x.x.1.0 netmask 255.255.255.0 gw wlan0.ip.address
I've tried:
route add -net x.x.0.0 netmask 255.255.255.0 gw eth0.ip.address but this causes the network to crash. Which makes sense as I believe it already has a route for that netmask.
I tried setting up a dhcp server with the dhcp.conf
option domain-name "somedhcpserver";
option domain-name-servers wlan.ip.address;
option routers x.x.1.1;
option ntp-servers wlan.ip.address;
default-lease-time 14440;
ddns-update-style none;
deny bootp;
shared-network intranet {
subnet x.x.1.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
pool { range x.x.1.5 x.x.1.15; }
}
}
but this doesn't seem to do anything.
I also tried setting up some iptable rules:
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -A FORWARD -i eth0 -o wlan0 -s x.x.1.0/24 -m conntrack --ctstate NEW -j ACCEPT
iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
I'm guessing I'm going to have to try and configure the IP Cam to allow the routes somehow (plugging directly into the router) but any help would be appreciated.