iptables (NAT/PAT) setup for SSH & Samba
Posted
by IanVaughan
on Server Fault
See other posts from Server Fault
or by IanVaughan
Published on 2010-04-29T13:07:03Z
Indexed on
2010/04/29
13:17 UTC
Read the original article
Hit count: 546
I need to access a Linux box via SSH & Samba that is hidden/connected behind another one.
Setup :-
A switch B C |----| |---| |----| |----| |eth0|----| |----|eth0| | | |----| |---| |eth1|----|eth1| |----| |----|
Eg, SSH/Samba from A to C
How does one go about this?
I was thinking that it cannot be done via IP alone? Or can it?
Could B say "hi on eth0, if your looking for 192.168.0.2, its here on eth1"?
Is this NAT?
This is a large private network, so what about if another PC has that IP?!
More likely it would be PAT?
A would say "hi 192.168.109.15:1234"
B would say "hi on eth0, traffic for port 1234 goes on here eth1"
How could that be done?
And would the SSH/Samba demons see the correct packet header info and work??
IP info :-
A - eth0 - 192.168.109.2 B - eth0 - 192.168.109.15 - eth1 - 192.168.0.1 C - eth1 - 192.168.0.2
A, B & C are RHEL (RedHat) But Windows computers can be connected to the switch. I configured the 192.168.0.* IPs, they are changeable.
Any help?
© Server Fault or respective owner