Need a port map solution for Linux [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
AnalogX makes a handy useful Windows utility named Portmapper. It listens on any ports you like and forwards traffic to another IP address. So you can open a range of ports in your router, all mapped to one machine. That machine then forwards each specific port to any address you like within the LAN.
This is a good solution for routers with a limited number of NAT entries available. Just point a range to a single PC and let it do the rest. It can forward port 80 traffic to 192.168.1.101, port 5900 to 192.168.1.102, and port 5901 to 192.168.1.103:5900, etc.
I'm looking for a linux-based replacement. Either a program where I create a config file detailing the port numbers and IPs to forward, or a strategy to use a built-in solution like iptables. Any suggestions on how to do this?

Well you can do that natively in Linux with iptables:
http://www.debuntu.org/how-to-redirecting-network-traffic-a-new-ip-using-iptables
http://ramblings.narrabilis.com/ip-forward-using-iptables-port-and-host-redirect
http://www.revsys.com/writings/quicktips/nat.html

Related

OpenVPN multiple IP addresses [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have an OpenVPN server running on my Linux box and it's working fine. The server has a lot of IP addresses but it only uses one for all the clients (of course).
Is it possible to use multiple IP addresses (public) on the same server?
If you post this question on ServerFault, this post will get more eyeballs.
OpenVPN can listen on multiple IP addresses. The directive local sets the IP address(s) it listens on. Here is an excerpt from OpenVPN man page.
--local host
Local host name or IP address for bind. If specified, OpenVPN will bind to this address only. If unspecified, OpenVPN will bind to all interfaces.
Watch out if you have multiple public IP addresses on multiple interfaces. You may have to resort to some sort of port forwarding. Probably you should make OpenVPN listen on a single interface, preferably local interface and port forward traffic coming from various public IP's to this Interface.

in linux, does routing take different path on loopback vs IP assigned to NIC [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am using RHEL 6.3 (2.6.x kernel). I have tcp based client server applications. I noticed that when i run them on the same host, the throughput is approx the same, irrespective whether server binds to loopback or local IP assigned to NIC.
What is the reason behind it? My understanding is that loopback is software based routing, where as when local IP assigned to NIC is involved, the hardware is involved in the data path. Is that true?
The hardware does not get involved.
As soon as the routing function knows that the destination address is local, the packet is switched to ingress path. Which is incidentally why sniffers can't capture such packets, because that hook happens to be after the point of this decision.

Want to Modify/MiTM for RTP traffic between two interface [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am running linux machine between two IP Phone with Two NIC card's. all of the traffic passthroug between eth0 and eth1 should move through TCP/IP stack.currently,IP-forwarding is enabled in linux and traffic route directly at Kernel level. If I am doing port forwarding using IPtables, I can get the traffic in TCP/IP stack but I dont want to perform port forwarding. Every time traffic is having different port, its difficult to map the port again with its original port.
Is there any other mechanism, I can get every packet in tcp/IP stack without port forwarding either using some routing or creating virtual interface/loopback interface?

Ubuntu as a server? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have installed latest Ubuntu (12.04) on my pc, and when I do ifconfig it shows this IP: 192.168.1.22.
I dont want to use internal ip, I want to use it as a server.
However when I visit www.whatismyip.com website it is actually showing my IP 27.82.XXX.XXX
How can I get this IP on my pc, So that I can use my pc as a server.
The 27.82.XXX.XXX IP is actually the global IP of your internet router, not your PC/server. If you want to be able to access your server using that IP, you will need to forward the proper ports from your router to the local IP of your server (192.168.1.22). For example, if you want to use it as a web server, you will probably need to forward ports 80 (HTTP) and/or 443 (HTTPS). Or if you need SSH access, forward port 22. Here is a good guide that explains how to do it.
Also, unless you have a static IP from your internet provider, don't expect that your global IP will stay the same. That's where dynamic DNS comes in. It allows you to assign a hostname that will always point to your server even when the IP changes. I personally prefer dnsdynamic.org because it's simple, free, and unlimited.

Routing IP packets from one IP addr to another [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Can somebody tell me what are the ways of routing packets in a linux system. I have an external and internal network interfaces on my linux system. I want to forward packets arriving at my external network to an internal network.
I do not have iptables. What are the other ways to this? What commands are offered by native linux. Should Netfilter always be enabled for this? My kernel does not come with Netfilter.
So please suggest.
Thanks in advance
Assuming you're talking about real routing, and not any form of Network Address Translation (NAT), you just need to enable IP forwarding, and put the relevant routes in your routing table:
echo 1 > /proc/sys/net/ipv4/ip_forward
Configuring NAT does require iptables.

Resources