Network Troublshooting > General Networking Support in Linux
Giving server access on Internet
vlinux1:
Hi All,
I have DNS,MAIl,WEB server and want to give access on Internet using NAT
what i need to do. please help me about this.
Thanks in advance
Vijay
gauravbajaj:
Means U wana access these servers through internet...???
I m not getting u, plz elobrate
Gaurav
Ricky:
Kindly elaborate your requirements more clearly.
vlinux1:
Hi Gaurav & Ricky
First Thanks for u r quick reply.
I have wan ip and i want to give access of these servers on Internet.
I want script that i can keep my servers secure from outside network (WAN)
and user must get access to these (Mail,HTTP,DNS) services from Internet.
I want to give private ip address to all these servers.
Is it possible through Iptables and how to do that please explain me.
and thanks again for your earliest reply
Thanks in advance
Vijay
Ricky:
You actually need port forwarding to internal network for few services.
For that just install servers on any internal machine and then only enable requried ports ..
--- Code: ---# this one is to redirect request on specific port to internal machine
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx
--dport 6401 -j DNAT --to yyy.yyy.yyy.yyy:6401
# this is to accept the replies
/sbin/iptables -A FORWARD -p tcp -i eth0 -d yyy.yyy.yyy.yyy --dport 6401 -j ACCEPT
--- End code ---
ie. for HTTP enable port 80 internal forwarding and for mail pop and smtp its 25 and 110 ..
and so on.
Navigation
[0] Message Index
[#] Next page
Go to full version