› Forums › Network Management › ZeroShell › 2 external ip
- This topic is empty.
Viewing 1 post (of 1 total)
-
AuthorPosts
-
August 27, 2008 at 11:46 am #41164
mezcal
MemberHello,
I have 3 networks:
ETH00 wan
ETH01 local network 192.168.1.0/24
ETHE01.100 local network 192.168.10.0/24 for server (192.168.10.101)2 externals ip 173.102.240.141(server) a 173.102.240.149(local network).
I cant use virtual server, becouse the server has another external ip.
So I have writed this commands:
iptables -A FORWARD -d 192.168.10.101 -i ETH00 -p tcp -m tcp --dport 80 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
iptables -A FORWARD -d 192.168.10.101 -i ETH00 -p tcp -m tcp --dport 22 --tcp-flags SYN,RST,ACK SYN -j ACCEPT
iptables -A FORWARD -s 192.168.1.0/24 -i ETH01 -o ETH00 -j ACCEPT
iptables -A FORWARD -s 192.168.1.0/24 -i ETH01 -o ETH01.100 -j ACCEPT
iptables -t nat -A PREROUTING -d 173.102.240.141 -i ETH00 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.10.101
iptables -t nat -A PREROUTING -d 173.102.240.141 -i ETH00 -p tcp -m tcp --dport 22 -j DNAT --to-destination 192.168.10.101
iptables -t nat -A PREROUTING -s 192.168.1.0/24 -d 173.102.240.141 -i ETH01 -j DNAT --to-destination 192.168.10.101
iptables -t nat -A POSTROUTING -s 192.168.10.101 -o ETH00 -j SNAT --to-source 173.102.240.141
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o ETH00 -j SNAT --to-source 173.102.240.149
internet is working in local network but the server isn`t working from external network.
Routing table:
192.168.10.0 255.255.255.0 Net 0 none ETH01 vlan 100 U Up Auto
192.168.1.0 255.255.255.0 Net 0 none ETH01 U Up Auto
DEFAULT GATEWAY 0.0.0.0 Net 0 173.102.240.129 ETH00 UG Up Static
What s wrong? It should be work.
Best regards
Filip -
AuthorPosts
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.