LinuxQuestions.org
Visit Jeremy's Blog.
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 01-03-2012, 07:30 PM   #1
madakhan
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
Port Forwarding


I am trying to setup communication between a Windows based SNMP management application and another Windows based device simulator software.

In order for the management application to consider devices to be unique, it needs them to have unique IP Addresses. However, the device simulator software implements multiple simulated devices by listening on only one IP, but assigning a unique port to each simulated device.

I figured I should be able to use NAT/port forwarding using a dual-NIC Fedora Linux box and forward/translate packets as follows:

10.0.0.1:161 -> 192.168.1.1:6001
10.0.0.2:161 -> 192.168.1.1:6002
.
.
10.0.0.100:161 -> 192.168.1.1:6100

On the Linux box, eth0 is connected to the 192.168.1.x subnet and eth1 is connected to the 10.0.x.x subnet. I have created these 10.0.0.x virtual IPs using eth1:0, eth1:1, etc virtual interfaces. I have been trying to understand how to achieve this using iptables but cannot get this to work properly.

I would greatly appreciate any suggestions. Thanks!
 
Old 01-03-2012, 08:19 PM   #2
blue_print
Member
 
Registered: May 2010
Location: In world
Distribution: RHEL, CentOS, Ubuntu
Posts: 275
Blog Entries: 3

Rep: Reputation: 50
There are some helpful links you can follow to enable port forwarding,

http://www.cyberciti.biz/faq/linux-p...with-iptables/
http://fclose.com/b/linux/816/port-f...sing-iptables/

Before creating iptables rules, please make sure that you have enabled ip_forward in kernel configuraiton

Quote:
vi /etc/sysctl.conf
Search for net.ipv4.ip_forward and change the value to 1

Quote:
net.ipv4.ip_forward =1
Then do
Quote:
sysctl -p
to update the changes
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Warning: remote port forwarding failed for listen port 7869 windstory Linux - Newbie 1 08-02-2010 10:07 AM
Shorewall: port forwarding problem, port is closed even after forwarding Synt4x_3rr0r Linux - Networking 2 12-13-2009 04:36 PM
port forwarding on Belkin 4-port Cable/DSL Gateway Router sycamorex Linux - Networking 5 03-05-2007 03:27 PM
IPCHAINS port forwarding and IPTABLES port forwarding ediestajr Linux - Networking 26 01-14-2007 07:35 PM
Simple Port Forwarding Firewall - not forwarding MadTurki Linux - Security 14 04-09-2006 12:08 PM

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

All times are GMT -5. The time now is 03:39 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration