I have an ubuntu server with a public IP, which I can reach with ssh from my local machine. However, when i put this server in a private network, I can no longer reach it with ssh from my local machine. Also, this server no longer has internet connection. (pinging google returns "unknown host")
If I remove the server from the private network, I can ssh to it again.
Here is the output of ifconfig:
eth0
Link encap:Ethernet HWaddr aa:0c:fa:58:e9:89
inet addr:83.212.x.x Bcast:83.212.x.x Mask:255.255.254.0
inet6 addr: y::y:y:y:y/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:472 errors:0 dropped:0 overruns:0 frame:0
TX packets:232 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:39445 (39.4 KB) TX bytes:16357 (16.3 KB)
eth1
Link encap:Ethernet HWaddr aa:00:0a:e5:59:7a
inet6 addr: y:y:y:y:y:y:y:y/64 Scope:Global
inet6 addr: y:y:y:y:y:y:y:y/64 Scope:Global
inet6 addr: y::y:y:y:y/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:745 errors:0 dropped:0 overruns:0 frame:0
TX packets:2463 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:70070 (70.0 KB) TX bytes:255901 (255.9 KB)
eth2
Link encap:Ethernet HWaddr aa:35:7a:43:a4:77
inet addr:192.168.0.6 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: y::y:y:y:y/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1782 errors:0 dropped:0 overruns:0 frame:0
TX packets:386 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:117153 (117.1 KB) TX bytes:24309 (24.3 KB)
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:17715 errors:0 dropped:0 overruns:0 frame:0
TX packets:17715 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3986302 (3.9 MB) TX bytes:3986302 (3.9 MB)
An here is the output of netstat -nr
:
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth2
0.0.0.0 83.212.x.x 0.0.0.0 UG 0 0 0 eth0
83.212.x.x 0.0.0.0 255.255.254.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
I have tried NATing, but it didn't work. Maybe I didn't do something correctly. I have no access to the router.