6 - How to add a route on ipcop? (subnet)

To be able to give access to Internet to your sub-networks, it will be necessary that ipcop knows the road to join the distant network. We leave with the principle which your router with address IP of ipcop like default gateway. In the example, the router with as addresses IP 192.168.1.10 and eth1 are the interface of ipcop connected to the LAN. and the sub-network with beach IP 192.168.2.0/24.

In line of order, authenticated as a root, type:

root@ipcop:~ # vi /etc/rc.d/rc.local

insert the following line :

route add -net 192.168.2.0/24 gw 192.168.1.10 eth1

leave the insert mode and type ":wq "to record the modifications and to leave VI.

So that the rules are observed, ipcop should be started again, type "reboot" in line of order