P
pendrag
Guest
Hi experts,
I'm trying to ping or to access my guest machines from host's command line without success.
Here is my /etc/network/interfaces file
Here is my iptables file:
The output of ifconfig -a is as follows:
Yet, when I try to ping or access through SSH to any of my guests (10.0.1.10 or 10.0.1.20) I cannot get them. Using the web-based VNC connection allows me to access guests' command line, but network is not available from them neither...
please help!
Thanks in advance...
I'm trying to ping or to access my guest machines from host's command line without success.
Here is my /etc/network/interfaces file
Code:
# network interface settings
auto lo
iface lo inet loopback
auto vmbr1
iface vmbr1 inet static
address 10.0.1.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
auto vmbr0
iface vmbr0 inet static
address 190.214.178.189
netmask 255.255.255.0
gateway 190.214.178.1
bridge_ports eth0
bridge_stp off
bridge_fd 0
Here is my iptables file:
Code:
*nat
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.0.1.0/24 -o vmbr0 -j MASQUERADE
-A PREROUTING -p tcp -i vmbr0 --dport 8090 -j DNAT --to-destination 10.0.1.10:22
-A PREROUTING -p tcp -i vmbr0 --dport 8080 -j DNAT --to-destination 10.0.1.10:80
-A PREROUTING -p tcp -i vmbr0 --dport 8443 -j DNAT --to-destination 10.0.1.10:443
-A PREROUTING -p tcp -i vmbr0 --dport 8190 -j DNAT --to-destination 10.0.1.20:22
-A PREROUTING -p tcp -i vmbr0 --dport 8180 -j DNAT --to-destination 10.0.1.20:80
-A PREROUTING -p tcp -i vmbr0 --dport 8543 -j DNAT --to-destination 10.0.1.20:443
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -p udp --dport 53 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A OUTPUT -p icmp --icmp-type any -j ACCEPT
-A INPUT -p icmp -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -p udp -m udp -d 150.214.170.36 --dport 123 -j ACCEPT
-A FORWARD -d 10.0.1.0/24 -i vmbr0 -p tcp -m multiport --dports 80,443 -j ACCEPT
-A FORWARD -s 10.0.1.0/24 -o vmbr0 -p tcp -m multiport --dports 80,443 -j ACCEPT
-A FORWARD -d 10.0.1.0/24 -i vmbr0 -p tcp -m tcp --dport 22 -j ACCEPT
-A FORWARD -d 10.0.1.0/24 -i vmbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s 10.0.1.0/24 -o vmbr0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -d 10.0.1.0/24 -i vmbr0 -p udp --dport 53 -j ACCEPT
-A FORWARD -s 10.0.1.0/24 -o vmbr0 -p udp --dport 53 -j ACCEPT
-A FORWARD -s 10.0.1.0/24 -p icmp --icmp-type any -j ACCEPT
COMMIT
The output of ifconfig -a is as follows:
Code:
eth0 Link encap:Ethernet HWaddr f0:4d:a2:3b:e1:36
inet6 addr: fe80::f24d:a2ff:fe3b:e136/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9796 errors:0 dropped:0 overruns:0 frame:0
TX packets:254 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1078872 (1.0 MiB) TX bytes:41010 (40.0 KiB)
Interrupt:24 Memory:e4000000-e4012800
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:7721 errors:0 dropped:0 overruns:0 frame:0
TX packets:7721 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2620962 (2.4 MiB) TX bytes:2620962 (2.4 MiB)
tap101i1d0 Link encap:Ethernet HWaddr 1e:29:f8:ef:a7:c3
inet6 addr: fe80::1c29:f8ff:feef:a7c3/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:31 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:2326 (2.2 KiB) TX bytes:3478 (3.3 KiB)
tap103i1d0 Link encap:Ethernet HWaddr a2:9e:3b:8c:e9:8b
inet6 addr: fe80::a09e:3bff:fe8c:e98b/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:132 errors:0 dropped:0 overruns:0 frame:0
TX packets:158 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:20592 (20.1 KiB) TX bytes:18100 (17.6 KiB)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
BROADCAST POINTOPOINT NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
vmbr0 Link encap:Ethernet HWaddr f0:4d:a2:3b:e1:36
inet addr:190.214.178.189 Bcast:190.214.178.255 Mask:255.255.255.0
inet6 addr: fe80::f24d:a2ff:fe3b:e136/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9778 errors:0 dropped:0 overruns:0 frame:0
TX packets:229 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:893072 (872.1 KiB) TX bytes:38194 (37.2 KiB)
vmbr1 Link encap:Ethernet HWaddr ee:e7:17:59:19:42
inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0
inet6 addr: fe80::ece7:17ff:fe59:1942/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:468 (468.0 B)
Yet, when I try to ping or access through SSH to any of my guests (10.0.1.10 or 10.0.1.20) I cannot get them. Using the web-based VNC connection allows me to access guests' command line, but network is not available from them neither...
please help!
Thanks in advance...