(You can probably do this with iptables on the router.)
Sorry, my bad, I meant in the server.
If eth0 is from the hub/modem and eth1 is from the router (which is probably also an ethernet switch right?) then you want to drop packets coming in eth1 which are sourced from outside the network.
Of course, there is another way.
You could simplify your setup.
Just put the server on the LAN behind the router.
If it is a web server, requests for your webpage can be routed to it. You'll also be able to offer other services direct to the LAN. Bringing the server down won't interfere with the operation of the LAN in terms of internet sharing - just the services hosted by your server box will vanish.
You just won't be able to use it as a software router is all (Though you could hang that hub off the second nic, and so have an extra LAN all to yourself? Practise intranet routing that way?)
Code:
[modem]------[router]---------------(mylan1.net)
|
[server]
|
-----[hub]-----(mylan2.net)
This way - the router automatically sends packets for the server to the server and there's no conflicts. Packets from the internet destined for
hostname@mylan2.net will also go to the server for routing. (Enable IP forwarding and let iptables do the routing... though you may have fun setting up the router.)
I think you'll find this easier to set up for what you want to do.