My Enviroment:
Server1(192.168.41.12)-----|Switch|----(eth0=192.168.41.8)Server3(eth1=A.B.C.D , REAL IP ADDRESS )
Server2(192.168.41.13)-----|
How configured:
Server3 - Linux(OpenSUSE)
iptables rules is:
Allow All from the Local LAN to The Public Internet
iptables -A FORWARD -i eth0 -j ACCEPT
MAsquerade all outgoing packets
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to A.B.C.D
PAT from the Internet to the Local LAN(Server1)
iptables -t nat -A PREROUTING -i eth1 -d A.B.C.D -p tcp --dport 443 -j DNAT --to-destination 192.168.41.12:443
iptables -A FORWARD -eth1 -p tcp --dport 443 -d 192.168.41.12 -j ACCEPT
How it work:
- From the internet:
telnet A.B.C.D 443
This is OK. ( on the Local Server1 i see incoming tcp:443 connection) - From the Server2:
telnet 192.168.41.12 443
This is OK ( on the Local Server1 i see incoming tcp:443 connection)
Problem:
1)
From the Server2:
telnet A.B.C.D 443
Connection not UP …
It is necessary for me that the packet passed so:
Server2----eth0_Server3_eth1----->Server1
Please, Help me
Serg