Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an UBUNTU server VM installation with two NICs. eth0 is on the LAN network, configured by DHCP and is working fine. I manually configured eth1 with a static IP on the DMZ network but can't ping it, I think this might be a routing issue but I'm new to this so any help would be appreciated! Please see below for 'ifconfig eth1' and 'route -n':

Destination    Gateway      Genmask        Flags  Metric  Ref  Use  Iface
0.0.0.0        172.20.20.1  0.0.0.0        UG     100     0    0    eth1
172.20.10.0    0.0.0.0      255.255.255.0  U      0       0    0    eth0
172.20.20.0    0.0.0.0      255.255.255.0  U      0       0    0    eth1

eth1

Link encap:Ethernet  HWaddr 00:50:56:ae:00:08
inet addr: 172.20.20.151  Bcasr:172.20.20.255 Mask:255.255.255.0
inet6 addr : fe80::250:56ff:feae:8/64 Scope:Link
UP BROADCAST RUNNING MULTCAST MTU:1500 Metric:1
RX packets: 23 errors:0 dropped:0 overruns:0 frame:0
TX Packets:22  errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txquwuwlwn:1000
RX bytes:2306 (2.3 KB) TX bytes:1794 (1.7KB)

Thanks, Charlotte.

share|improve this question
    
Where are you pinging from? Or you can't ping it from the local machine? –  Mr Shunz May 9 '12 at 13:36
    
I can ping 172.20.20.151 from the local machine, but not from another machine on the LAN. –  Charlotte May 9 '12 at 14:33
add comment

1 Answer

Based on the answer to my comment above...

You should let know to the other machines on the LAN how to reach the 172.20.20.0/24 subnet.

You said that the LAN address is assigned by DHCP. So I suppose this server is not your default gateway for the LAN.

First, you should reconfigure it as a static address (say 172.20.10.100), then:

  • Put a route for 172.20.20.0/24 via 172.20.10.100 (the static LAN IP) on the default gateway of your LAN.
  • Enable ip forwarding on your server, by issueing the command:

    sysctl -w net.ipv4.ip_forward=1

Note: to permanently enable ip forwarding edit the file /etc/sysctl.conf and make sure it has the line net.ipv4.ip_forward = 1. On my ubuntu machine there's something like:

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.