LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-14-2006, 01:43 PM   #1
munirhossain
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
redirect all packet from real ip to lan ip


Hello to all
Im new to linux. One of my voice application running on a windows 2003 server and that specific application need 172.27.0.1 ip to run.So i set windows 2003 server ip to 172.27.0.1(private ip).now i want to access my windows server's voice application from internet. For this reason i want to setup a linux server which ip is 203.91.148.10(real ip).Now i want to access windows server's voice service from internet though this linux server. So can u people help me to redirect or forward all packets(tcp,udp,icmp) to windows server to get the service from that application running on windows server when user hits linux server's real ip from internet.
internet_user->linux_server->windows_server(voice application
)
 
Old 03-15-2006, 10:53 PM   #2
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
Do you know what ports and protocols the voice application uses? You will need them.

The best way I know how to do it, is to use an iptables rule like..

Code:
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 203.91.148.10 --dport 8888 -j DNAT --to 172.27.0.1:8888
iptables -A FORWARD -p tcp -i eth0 -d 172.27.0.1 --dport 8888 -j ACCEPT
..just modify the port numbers and protocols that your application requires.

If you're new to Linux, I'd recommend taking a look at the IP-Masquerade-HOWTO.
and doing a bit of reading on iptables. They'll help you set up a decent firewall.

Hope this helps.
 
Old 03-18-2006, 11:20 AM   #3
munirhossain
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Redirect all packet to Nated computer

Hello,
Thanks for your reply. I like to know is that possible to redirect all ports packets to 172.27.0.1 from 203.91.100.4(real ip)
Thanks in advanced
 
Old 03-18-2006, 12:22 PM   #4
otisthegbs
Member
 
Registered: May 2003
Location: Vancouver
Distribution: RH9
Posts: 100

Rep: Reputation: 15
yes it is

i dont understand, did you ask again if its possible? If so. Yes it and camh gave two nice simple rules to help you achieve your goal but again like he say you'll need to know the protocol tcp/udp/etc and which ports they need. Note for defining more than one port in sequence use a ":"

example

iptables -t nat -A PREOUTING -p tcp -i eth0 --dport 560:562 -j DNAT --to-destination 192.168.1.2

this will forward ports 560, 561, and 562 to 192.168.1.2

hope it helps
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Packet Filter to redirect a packet to a user level process akawale Linux - Networking 3 09-01-2006 12:06 PM
Setup Real ip on my Lan abakali Linux - Networking 3 12-07-2005 12:22 AM
Whats a magic packet (wake on lan) (in terms of routability, and security) qwijibow Linux - Hardware 1 01-28-2005 06:52 PM
Any real success with 1000 Mbit LAN? Post speeds! birkinshawc Linux - Hardware 2 04-09-2004 05:40 AM
ftp real slow over lan GraemeK Linux - Networking 5 01-26-2004 07:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration