Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd February 2008, 04:39
jacobhenry jacobhenry is offline
Member
 
Join Date: Feb 2006
Posts: 45
Thanks: 0
Thanked 2 Times in 2 Posts
Default The Perfect Xen 3.1.0 Setup For Debian Etch

I have successfully installed xen using the HowTo at http://www.howtoforge.com/debian_etch_xen_3.1. I chose to finish the final page, which was optional, with the hope of "Creat(ing) A Virtual Local Network From The Virtual Machines". This required me to change the gateway, netmask, and IP address of the instances.

My original goal was to create a virtual local network with the xen server acting as the router and name server:
The tutorial discusses how to use iptables to achieve port forwarding but this limits me to having one server (instance) per port. Many of my servers have there own web interface (trac, mysql, etc) which means I must somehow create a name server that provides the desired functionality (shown above). Any suggestions?
Reply With Quote
Sponsored Links
  #2  
Old 3rd February 2008, 19:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

You can try to use routing in Xen instead of NAT.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st April 2008, 08:19
jacobhenry jacobhenry is offline
Member
 
Join Date: Feb 2006
Posts: 45
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I am now having difficulties with the iptables discussed on the last page of the tutorial. What I need to do is forward all requests on port 3306 to my sql server. Right now this is what I have in /etc/network/if-up.d/iptables

Code:
#!/bin/sh

### Port Forwarding ###
iptables -A PREROUTING -t nat -p tcp -i eth0 --dport 3306 -j DNAT --to 10.0.0.2:3306
Even with these settings I am not able to connect to my sql server with a client. Here is the output of iptables -L:

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     0    --  api.scratchco.com    anywhere            PHYSDEV match --physdev-in vif1.0 
ACCEPT     udp  --  anywhere             anywhere            PHYSDEV match --physdev-in vif1.0 udp spt:bootpc dpt:bootps 
ACCEPT     0    --  svn.scratchco.com    anywhere            PHYSDEV match --physdev-in vif2.0 
ACCEPT     udp  --  anywhere             anywhere            PHYSDEV match --physdev-in vif2.0 udp spt:bootpc dpt:bootps 
ACCEPT     0    --  mysql.scratchco.com  anywhere            PHYSDEV match --physdev-in vif4.0 
ACCEPT     udp  --  anywhere             anywhere            PHYSDEV match --physdev-in vif4.0 udp spt:bootpc dpt:bootps 
ACCEPT     0    --  hudson.scratchco.com  anywhere            PHYSDEV match --physdev-in vif5.0 
ACCEPT     udp  --  anywhere             anywhere            PHYSDEV match --physdev-in vif5.0 udp spt:bootpc dpt:bootps 

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Any suggestions?
Reply With Quote
  #4  
Old 22nd April 2008, 16:54
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
 
Default

Did you run
Code:
iptables -A PREROUTING -t nat -p tcp -i eth0 --dport 3306 -j DNAT --to 10.0.0.2:3306
on the shell as well?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting up quota in perfect Etch server - no setup chancer Installation/Configuration 1 5th January 2008 14:32
The Perfect Xen 3.1.0 Setup For Debian Etch (i386) ko0nz HOWTO-Related Questions 8 13th November 2007 20:48
The Perfect Xen 3.0.3 Setup For Debian Sarge BOfH HOWTO-Related Questions 1 1st January 2007 19:44
iptables issue with xen perfect setup - debian alexnz HOWTO-Related Questions 3 25th November 2006 13:49
The Perfect Xen 3.0 Setup For Debian - IpTables Problem Gurke666 HOWTO-Related Questions 2 21st April 2006 17:21


All times are GMT +2. The time now is 06:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.