I am trying to connect two ubuntu 14.04 pc to each other by using crossover cable. From network settings i gave IP addresses as ;(Ipv4 manual) PC1 - IP:10.0.0.1 Network Mask:255.255.255.0 PC2 - IP:10.0.0.2 Network Mask:255.255.255.0
PC1 is the server and it has apache installed. It serves pages from localhost. I wanted to see this web page from PC2 browser by typing IP1. However, my problem is starting from the beginning which I cannot even ping from PC1 to PC2 or vice versa.
results of "ifconfig"
PC1: eth2 Link encap:Ethernet HWaddr 40:a8:f0:5e:91:94
inet addr:10.42.0.1 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::42a8:f0ff:fe5e:9194/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38 errors:0 dropped:0 overruns:0 frame:0
TX packets:246 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7569 (7.5 KB) TX bytes:39911 (39.9 KB)
Interrupt:20 Memory:ec200000-ec220000
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:65536 Metric:1
RX packets:933 errors:0 dropped:0 overruns:0 frame:0
TX packets:933 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:74985 (74.9 KB) TX bytes:74985 (74.9 KB)
PC2: eth2
Link encap:Ethernet HWaddr 40:a8:f0:5e:92:48
inet addr:10.42.0.40 Bcast:10.42.0.255 Mask:255.255.255.0
inet6 addr: fe80::42a8:f0ff:fe5e:9194/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:467 errors:0 dropped:0 overruns:0 frame:0
TX packets:460 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:64183 (64.1 KB) TX bytes:54663 (54.6 KB)
Interrupt:20 Memory:ec200000-ec220000
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:65536 Metric:1
RX packets:1380 errors:0 dropped:0 overruns:0 frame:0
TX packets:1380 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:103299 (103.2 KB) TX bytes:103299 (103.2 KB)
iptables --list
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT udp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere state RELATED,ESTABLISHED
REJECT udp -- anywhere anywhere udp dpt:mdns reject-with icmp-port-unreachable
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere PKTTYPE = broadcast
DROP all -- anywhere anywhere PKTTYPE = multicast
LOG all -- anywhere anywhere state INVALID LOG level warning prefix " Invalid "
DROP all -- anywhere anywhere state INVALID
LOG all -- anywhere anywhere limit: avg 25/min burst 7 LOG level info prefix "#BANNED-BY-ROOT# "
DROP all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT udp -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere state RELATED,ESTABLISHED
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Server has extra:
Chain Input
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere udp dpt:bootps
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere udp dpt:domain
Chain Forward
ACCEPT all -- anywhere 10.42.0.0./24 state RELATED,ESTABLISHED
ACCEPT all -- 10.42.0.0./24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
network-manager
(if yes, with the applet or with its configuration files), with/etc/network/interfaces
, etc.