Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running Cloudmin GPL on CentOS 5 64bit and am trying to allow my Xen PV guest to access the internet via a NAT/port forwarding setup.. I've done the following:

(on dom0)

echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -j MASQUERADE
iptables -A PREROUTING -t nat -p tcp -i eth0 --dport 8001 -j DNAT --to 192.168.3.2:22

info from http://jonmccune.wordpress.com/2008/08/25/iptables-nat-in-xen/

    eth0      Link encap:Ethernet  HWaddr 00:1C:C0:F2:23:1A  
          inet addr:x.x.x.35  Bcast:199.x.x.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:346089 errors:0 dropped:0 overruns:0 frame:0
          TX packets:180430 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:484168952 (461.7 MiB)  TX bytes:15039620 (14.3 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4574 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4574 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2152282 (2.0 MiB)  TX bytes:2152282 (2.0 MiB)

peth0     Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:350814 errors:0 dropped:0 overruns:0 frame:0
          TX packets:181306 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:491256661 (468.4 MiB)  TX bytes:14977668 (14.2 MiB)
          Interrupt:22 Memory:d0700000-d0720000 

vif0.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:180439 errors:0 dropped:0 overruns:0 frame:0
          TX packets:346090 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:15040646 (14.3 MiB)  TX bytes:484169018 (461.7 MiB)

vif7.0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1620 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:384 (384.0 b)  TX bytes:109172 (106.6 KiB)

xenbr0    Link encap:Ethernet  HWaddr FE:FF:FF:FF:FF:FF  
          UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
          RX packets:8631 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:405819 (396.3 KiB)  TX bytes:0 (0.0 b)

Added ip "192.168.3.2" to the guest and started the guest but theres no internet connectivity or port forwarding to -> guest or from guest.

I can't find any option in cloudmin gpl to provide nat port forwarding?

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.