Hi all!
I have troubles in my network configuration and i cant solve them.
Help pls.
I have three network interfaces on HOST1:
eth0 - 172.16.1.1 local network
I added two virtual network interfaces to eth0.
eth0:1 111.111.111.111 external IP address (need send to HOST2)
eth0:2 192.168.1.2/30 Transport network with only two IP addresses
HOST2:
Will recieve external IP address (111.111.111.111) from HOST1.
Have transport network IP 192.168.1.1/30
I can send ICMP packets from 192.168.1.2 to 192.168.1.1 host2 is avaible in network
I configure NAT on HOST1 to send external address
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -t nat -A POSTROUTING -o eth0:1 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
Added gateway on external network interface
Code:
route add -net 0.0.0.0 gw 192.168.1.1 dev eth0:1
I need connect from local network 172.16.1.0 through HOST1 (eth0 172.16.1.1) and send external IP (111.111.111.111) using transport network.
My NAT doesnt work with transport network and i dont understand how configure network in this situation