Hi
Apologies for the simplistic of the question but I am starting to really struggle with this.
I am trying to generate some IPs in my development boxes so I can use them as I source to send packages to the outside world.
i.e.
Code:
nc -s <src_ip> website port
GET / HTTP/1.1. Host: website
The purpose of this is testing some applications and routings related to proxies and web based applications.
So... What I have initially thought about was, given I got just 1 physical interface, create an alias with any IP and to work from there..
so..
Given an eth0, IP: 192.168.10.20 . GW : 192.168.10.1
alias: eth0:0 IP: 10.20.30.1
The alias works all right, and while I can recall local services from that IP I CANNOT route the traffic to GW: 192.168.10.1
I have played long with the routing tables but I cannot manage.
I have also tried to add new addresses to that device (At the present I do not need the change permanent)..
ip addr add 10.20.20.2 dev eth0
The same about the routing.... and while the device is present I still cannot manage to use that source IP to route traffic out of the box
on both scenarios I am the experiment seems 50:50 working..I can see the packages leaving the box:
Code:
10.20.20.2.41167 > lhr14s20-in-f18.1e100.net.80: Flags [S], cksum 0x3159 (correct), seq 521265741, win 14600, options [mss 1460,sackOK,TS val 1658046 ecr 0,nop,wscale 6], length 0
But it seems the remote server cannot resolve, it cannot return the packages as it does not know what to do ...(at least that is my understanding of what is happening)
So it will not even start initiating the connection.
Any tip so I can move this forward please?
Just to say, I am reading documentation for days but at the present I got stranded on this as I have some gaps in the knowledge so I cannot completely tie all the bits together which is pretty frustrating.
Thanks very much.