LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-29-2008, 01:59 AM   #1
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Rep: Reputation: 15
Unhappy iptables rule for routing


Hi,
I am using a virtual machine on my machine. My system ip address is 192.168.0.12, Gate way 192.168.0.1 mask is 255.255.255.0. My virtual machine's ip is 192.168.1.25. Now how do i do ssh to my virtual machijne. what gate way should i use on vartual host and what are the iptables rule should use on virtual machine. so that virtual machine should provide service to 192.168.0.0 network. Thanks for any help...

Last edited by bkcreddy17; 08-29-2008 at 03:26 AM.
 
Old 08-29-2008, 03:33 AM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
What virtualization application are you using? VMware Server, Xen, something else? The instructions are different for each.

If you're using VMware Server and you choose NAT for the network type, then the virtual guest (don't call it "host", in VMware-speak "host" is the machine that's running VMware, while "guests" are OSs running inside VMware) should set it's gateway to 192.168.1.2, assuming you have configured VMware to use this network for NAT (did you do that, or did you just pick an IP at random?). The guest should also set nameserver 192.168.1.2 in /etc/resolv.conf . You'll need to configure the nat.conf in VMware to use a local port in your host OS to forward to the guest OS for ssh.
 
Old 08-29-2008, 04:38 AM   #3
bkcreddy17
Member
 
Registered: Feb 2008
Location: India-Hyderabad
Distribution: RHEL and Fedora
Posts: 171

Original Poster
Rep: Reputation: 15
I am using RHX_groundwork which is running under XEN Kernel.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables: rule with RETURN target just after a rule with ACCEPT target Nerox Linux - Networking 6 09-04-2011 03:33 PM
policy rule routing problem - help me pandanvn Linux - Networking 3 04-02-2007 06:24 PM
policy rule routing problem - help me pandanvn Linux - Networking 0 03-16-2007 12:03 AM
routing and ip rule mebaro Linux - Networking 4 01-03-2006 10:48 PM
c code for routing dynamically (just like performing iptables rule) becky_starr Linux - Software 0 01-15-2004 03:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration