Sponsored Content
Full Discussion: port mapping with fake ip
Top Forums UNIX for Advanced & Expert Users port mapping with fake ip Post 302389387 by adderek on Sunday 24th of January 2010 04:44:53 PM
Old 01-24-2010
I am not sure what is the purpose of this question, nor if you are going to use it in a legal way.
To change a local port to be coming from another IP - this is called tunelling. It is quite simple.
If you want to make this on some local machine then you need to mangle with the TCP/IP. There are multiple ways to achieve that. I would suggest Linux + IPTables + SNAT (Source NAT) which is exactly what you need. You might use google to find how to do a SourceNAT (SNAT) on other platforms and using some specific tools.

Short description of what SNAT might be:
"If a packet is going out from my PC from port 1234 then its source IP should be replaced to IP 5.6.7.8". It would be something like (might be wrong as I am not testing that): "iptables -A MANGLE -p tcp --sport 1234 -j SNAT --from-ip 5.6.7.8"
 

8 More Discussions You Might Find Interesting

1. IP Networking

Routing, Port Mapping, Internet Sharing etc etc

I'm running OS X. (OS X Server actually) and right now I use a program called BrickHouse to handle my router configuration. But this program kind of sucks. I'd much rather learn how to configure these programs manually. By these programs, I mean the programs OS X comes with to handle these jobs... (0 Replies)
Discussion started by: l008com
0 Replies

2. Linux

Fake System32 Folder

I read somewhere that you can create a fake system32 folder in linux where you can store the most common windows runtime libraries, that way you can install windows programs (using wine) directly in linux, what I meen is that even the installer works. Does anyone know how I can do this, and where... (2 Replies)
Discussion started by: Kimm
2 Replies

3. Shell Programming and Scripting

Fake deletion of files

Hi, This is possibly an odd request to do with permissions as I seem to have tied myself up with these! I have the following directory (see below) that contains files that the 'usergrp' user needs to be able to 'delete' files from. drwxr-s--- 2 usergrp usergrp 512 16 Feb 14:37... (2 Replies)
Discussion started by: Peejay
2 Replies

4. IP Networking

port mapping

Hello to all! I am new to this interesting forum. My questions is not totally related to unix/linux systems, but I am not finding proper place where to make my question and this forum seems to be visited by experts and unix/linux experts are epxerts in everything My ISP has two kinds of... (1 Reply)
Discussion started by: kallquk
1 Replies

5. UNIX for Dummies Questions & Answers

fake network address....

Good morning! Why would having a fake network device be useful? Thanks in advance Bigben (0 Replies)
Discussion started by: bigben1220
0 Replies

6. IP Networking

What is a fake network device?

Thanks in advance! Ben (1 Reply)
Discussion started by: bigben1220
1 Replies

7. Shell Programming and Scripting

Creating unique mapping from multiple mapping

Hello, I do not know if this is the right title to use. I have a large dictionary database which has the following structure: where a b c d e are in English and p q r s t are in a target language., the two separated by the delimiter =. What I am looking for is a perl script which will take... (5 Replies)
Discussion started by: gimley
5 Replies

8. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies
NAT action in tc(8)						       Linux						       NAT action in tc(8)

NAME
nat - stateless native address translation action SYNOPSIS
tc ... action nat DIRECTION OLD NEW DIRECTION := { ingress | egress } OLD := IPV4_ADDR_SPEC NEW := IPV4_ADDR_SPEC IPV4_ADDR_SPEC := { default | any | all | in_addr[/{prefix|netmask}] DESCRIPTION
The nat action allows to perform NAT without the overhead of conntrack, which is desirable if the number of flows or addresses to perform NAT on is large. This action is best used in combination with the u32 filter to allow for efficient lookups of a large number of stateless NAT rules in constant time. OPTIONS
ingress Translate destination addresses, i.e. perform DNAT. egress Translate source addresses, i.e. perform SNAT. OLD Specifies addresses which should be translated. NEW Specifies addresses which OLD should be translated into. NOTES
The accepted address format in OLD and NEW is quite flexible. It may either consist of one of the keywords default, any or all, represent- ing the all-zero IP address or a combination of IP address and netmask or prefix length separated by a slash (/) sign. In any case, the mask (or prefix length) value of OLD is used for NEW as well so that a one-to-one mapping of addresses is assured. Address translation is done using a combination of binary operations. First, the original (source or destination) address is matched against the value of OLD. If the original address fits, the new address is created by taking the leading bits from NEW (defined by the netmask of OLD) and taking the remaining bits from the original address. There is rudimental support for upper layer protocols, namely TCP, UDP and ICMP. While for the first two only checksum recalculation is performed, the action also takes care of embedded IP headers in ICMP packets by translating the respective address therein, too. SEE ALSO
tc(8) iproute2 12 Jan 2015 NAT action in tc(8)
All times are GMT -4. The time now is 06:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy