<div dir="ltr"><div><div><div><div>Hello,<br><br></div>I am facing some problems in bridged networking.<br><br></div>I have successfully created a bridge br0 and added a virtual machine to it. Now the address of virtual machine is 10.1.3.31. I am able to connect to this virtual machine by another computer on same network.<br><br></div>The virtual machine is hosting a simple python http server on port 8000, while some other service is running on port 80<br><br></div><div>When I try his on my main server :<br></div><div># curl <a href="http://10.1.3.31:80">10.1.3.31:80</a><br><br></div><div>Response I get is this : <br>* Rebuilt URL to: <a href="http://10.1.3.31:80/">10.1.3.31:80/</a><br>* Hostname was NOT found in DNS cache<br>*   Trying 10.1.3.31...<br>* Connected to 10.1.3.31 (10.1.3.31) port 80 (#0)<br>> GET / HTTP/1.1<br>> User-Agent: curl/7.35.0<br>> Host: 10.1.3.31<br>> Accept: */*<br>> <br>* Recv failure: Connection reset by peer<br>* Closing connection 0<br>curl: (56) Recv failure: Connection reset by peer<br><br></div><div>But when I try this on any other port<br></div><div># curl <a href="http://10.1.3.31:8000">10.1.3.31:8000</a><br><br></div><div>Response I get is this:<br>* Rebuilt URL to: <a href="http://10.1.3.31:8000/">10.1.3.31:8000/</a><br>* Hostname was NOT found in DNS cache<br>*   Trying 10.1.3.31...<br>* connect to 10.1.3.31 port 8000 failed: Connection timed out<br>* Failed to connect to 10.1.3.31 port 8000: Connection timed out<br>* Closing connection 0<br>curl: (7) Failed to connect to 10.1.3.31 port 8000: Connection timed out<br><br><br></div><div>Output of iptables -L: <br>Chain INPUT (policy ACCEPT)<br>target     prot opt source               destination         <br>ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:ftp<br>ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:8000<br>ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:1022<br><br>Chain FORWARD (policy DROP)<br>target     prot opt source               destination         <br>ACCEPT     all  --  anywhere             <a href="http://10.0.0.0/16">10.0.0.0/16</a>          state RELATED,ESTABLISHED<br>ACCEPT     tcp  --  anywhere             10.0.2.4             tcp dpt:http-alt<br>ACCEPT     tcp  --  anywhere             10.0.2.4             tcp dpt:1883<br>ACCEPT     tcp  --  anywhere             10.0.2.4             tcp dpt:1883<br>TCPMSS     tcp  --  anywhere             anywhere             tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU<br><br>Chain OUTPUT (policy ACCEPT)<br>target     prot opt source               destination<br><br></div><div>Output of ifconfig:<br>br0       Link encap:Ethernet  HWaddr 00:1a:64:c1:31:2e  <br>          inet addr:10.1.3.33  Bcast:10.1.3.255  Mask:255.255.255.0<br>          inet6 addr: fe80::21a:64ff:fec1:312e/64 Scope:Link<br>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>          RX packets:1578351 errors:0 dropped:15619 overruns:0 frame:0<br>          TX packets:1327458 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:0 <br>          RX bytes:198829729 (198.8 MB)  TX bytes:346380435 (346.3 MB)<br><br>eth1      Link encap:Ethernet  HWaddr 00:1a:64:c1:31:2e  <br>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>          RX packets:7429105 errors:0 dropped:31238 overruns:0 frame:0<br>          TX packets:7684361 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:1000 <br>          RX bytes:782334104 (782.3 MB)  TX bytes:2221485458 (2.2 GB)<br><br>lo        Link encap:Local Loopback  <br>          inet addr:127.0.0.1  Mask:255.0.0.0<br>          inet6 addr: ::1/128 Scope:Host<br>          UP LOOPBACK RUNNING  MTU:65536  Metric:1<br>          RX packets:87278 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:87278 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:0 <br>          RX bytes:12350508 (12.3 MB)  TX bytes:12350508 (12.3 MB)<br><br>vnet0     Link encap:Ethernet  HWaddr fe:54:00:14:0e:98  <br>          inet6 addr: fe80::fc54:ff:fe14:e98/64 Scope:Link<br>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>          RX packets:6411332 errors:0 dropped:0 overruns:0 frame:0<br>          TX packets:6277721 errors:0 dropped:0 overruns:0 carrier:0<br>          collisions:0 txqueuelen:500 <br>          RX bytes:1909595770 (1.9 GB)  TX bytes:656284846 (656.2 MB)<br><br></div><div>Output of cat /etc/network/interfaces :<br>auto lo<br>iface lo inet loopback<br><br>auto eth1<br>iface eth1 inet static<br>  address 10.1.3.33<br>  netmask 255.255.255.0<br>  gateway 10.1.3.1<br>  dns-nameservers 192.168.2.11 192.168.2.12<br><br>auto br0<br>iface br0 inet static<br>    address 10.1.3.33<br>    netmask 255.255.255.0<br>    gateway    10.1.3.1<br>    dns-nameservers 192.168.2.11 192.168.2.12<br>    bridge_ports eth1<br>    bridge_stp off<br>    bridge_maxwait 5<br>    dns-nameservers 192.168.2.11 192.168.2.12<br><br></div></div>