I do not have the router so i make the Linux system into router having centos 6.4 for forwarding the Public network traffic to my local LAN.It has the two NIC card. one for public ip (eth1) and another for private ip (eth2).
I have a server which is connected to my local LAN suppose 192.168.1.2.
x.x.x.x is for public ip (this ip is on eth1).
Linux system router ip suppose 192.168.1.1 (this ip is on eth2)
I want that when someone from any network from anywhere use this i.e
ssh x.x..x.x (public ip) or using putty
it will goes to server.
I disable the Selinux and iptables firewall on server
I did some Iptables modification on the Linux system router but it goes to itself which work as a router not to the main server from other network and same network also.
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.1 --dport 22 -j DNAT --to-destination 192.168.1.2:22
but not works.
and again i want to forward all the http (80) traffic to my internal server using iptables from same Linux system router.
I need this kindly give me solution over this.