Setting up linux with public IP
I posted this in the sticky post at the top but realized it had not been touched in 3 yrs.
The sticky post was a good Good tutorial for dhcp from ISP but you did not address if a static IP is purchased from ISP.
My understanding is that for static IP's I should be issuing the following commands: (where 123.456.789.012 is assigned address, 255.255.255.248 is the subnet mask, 123.456.888.999 and gate way is 123.456.888.999 )
>ifconfig eth0 123.456.789.012 netmask 255.255.255.248
>route add default gw 123.456.888.999
and then add to the resolv.conf the
My route - n gives the following results:
Dest gateway genmask flags metric Ref use IF
123.456.789.144 * 255.255.255.0 U 0 0 0 eth0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth1
127.0.0.1 * 255.0.0.0 U 0 0 0 lo
default 123.456.888.999 0.0.0.0 UG 0 0 0 eth0
route command (without the -n) hangs for long time at default gateway. Unable to ping gateway/nameservers and lights on dlink are not blinking, they are either on or off. Cant remember which lights come on.
I use a dlink 300i to connect to the ISP (TELUS) and if I connect a windows computer directly to it (no special software) with the static IP, it connects fine. When I connect the Linux box (which is going to be the gateway) I get 'network unreachable' on the linux box and can't ping the gateway. If I put a router which I borrowed for testing between the dlink and linux box, changing eth0 to an internal IP I can then reach the internet.
1st question is, what else can I do/check to identify the problem?
2nd, if I do get myself a router to use between dlink and linuxbox, will it then be worthwhile to have linux as a gateway for port forwarding and firewall since many router have firewall in them? I would assume that to be effective, I would have to create two internal subnets for the Interfaces on the linuxbox (IE 192.168.1.x for ext interface and 192.168.2.x for internal interface and windows box). In this scenario, is it possible to forward a port to linux which would then forward it again to windows?
FYI:I was wanting to set up both linux and windows box for external access from the net for different purposes. I am right in that I only need one external IP and use port forwarding to do this correct?.
I have been experimenting with this for a while and have searched the web endlessly for the last few weeks/months intermittently. Sorry if the above lacks clarity. I am doing most of the posting from memory.