0

I have two machines. Machine 1 (denoted as M1) is Windows 7 and has two network cards. Machine 2 (denoted as M2) is RedHat 6.5. In M1, the first network card is connected into the Internet and the second network card is connected to M2. Now both M1 and M2 can have network accesses.

M2 is my local server, and I have installed the WWW server and the SSH server at it. Now I want to other machines can access the WWW service ans SSH service in M2. How could I set up the network in M1 to meet this need? Is it necessary to install a DNS server in M1?

2
  • Is 'M1' connected directly to the cable/fiber/dsl modem, or is there a router in between the two? Similarly, is the IP address on that NIC of M1's an internet visible address or is it a NAT address? That makes a big difference in how to resolve this. If you do have a simple LAN of modem <--> M1 <--> M2 I would personally suggest putting the RHEL 6.5 machine in M1's position and moving M2 (windows) into the relative protection of the RHEL machine (assuming a properly configured firewall). RHEL is designed to be an internet facing server OS; windows 7 is definitely not.
    – Argonauts
    May 22, 2016 at 0:28
  • @Argonauts, thanks for comments! Both M1 and M2 were originally connected to a modem. They are in a LAN 192.168.0.*. The modem has the public network IP. At that time, I set a port mapping in the modem, so that the WWW requests or SSH requests are transmitted into M2. Now I get rid of the modem and let M1 access the Internet via M1's second network card. You're right, maybe we should exchange the position between M1 and M2. My main concern is that if the RedHat was exposed into the Internet, maybe it needs more secure setting.
    – mining
    May 22, 2016 at 1:52

2 Answers 2

0

Just set both cards to static ips on the same subnet. For example: M1 (internal card) to 192.168.1.100, M2 to 192.168.1.101. Make sure the subnet masks are the Same (255.255.255.0 usually) and leave the gateway blank for now. That should be enough for M1 to be able to access all the services provided on M2. Install a DHCP on M2 if you want to automate the process of assigning ips. However, make sure those ips don't conflict with the ones your router provides.

As for sharing the Internet connection, I'm not so sure. You would have to configure your windows machine to bridge between both installed cards. You can achieve this by going to the network center, selecting both cards and do a right click - bridge. However, this might break the connection between M1 and M2 as setup above.

1
  • Thanks for your reply! Yes, I've set up the net accesses for both machines. Now I want to others can access the M2's WWW or SSH service via the M1's public IP. For example, M1 card1: 201.33.5.5, M1 card2: 192.168.0.1, M2 card1: 192.168.0.2. Now I want to 201.33.5.5/www/index.html can be the M2's WWW service.
    – mining
    May 21, 2016 at 14:43
0

Two nics on the same machine and subnet is not recommended due to unexpected behavior. Only exception is when this is done motivated by redundancy and even then there is better ways of doing it. The functionality and network performance on your windows machine is also severely reduced. Put the nics on different subnets and forward ports on windows machine from network nic to server nic for the services on your *nix.

1
  • Thanks for answer! Yes, I have a home modem and on it I can set the forward port into a internal server. But here I use two network cards to share the network. The network performance seems OK to me.
    – mining
    May 21, 2016 at 15:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .