I have installed ubuntu server 11.04 edition (with LAMP, mail server, and SSH server) and I try to connect to the internet. When I plug the cable from my ISP with the configuration provided below to a router and then back to my server the connection works fine, but when I try to put the cable directly to my server without the router, with the same information configuration the internet connection doesn't work any more.
resolv.conf
nameserver 81.180.166.1
eth0 Link encap:Ethernet HWaddr 00:12:79:a5:0b:39
inet addr:81.180.166.151 Bcast:81.180.167.255 Mask:255.255.254.0
inet6 addr: fe80::212:79ff:fea5:b39/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5697 errors:0 dropped:1854 overruns:0 frame:0
TX packets 34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:467192 TX bytes:2594
interrupt:25
In /etc/network/interfaces:
auto eth0
iface eth0 inet static
ip:81.180.166.151
subnetmask:255.255.254.0
gateway:81.180.166.1
dns: 193.230.240.16
mac:00 0E A6 41 C6 38.
ifconfig -awith the dynamic net and the static one connected. – Bruno Pereira♦ Oct 3 '11 at 7:43