Home » Questions » Computers [ Ask a new question ]

Ubuntu: Fake ip address

Ubuntu: Fake ip address

I have a software package which is hard-coded to open a connection to a certain local IP address. Unfortunately, the local network settings have changed, And I can't access the source code (long story).

Asked by: Guest | Views: 240
Total answers/comments: 2
Guest [Entry]

"A colleague of mine introduced me to iptables:

iptables -t nat -A OUTPUT -d 192.168.1.100 -j DNAT --to-destination 192.168.1.15"
Guest [Entry]

"Add the server IP as a subinterface on the server. Add another IP in that network to the client machine as a subinterface.

This assumes they are currently on the same network.

server# ifconfig eth0:1 192.168.1.100

client# ifconfig eth0:1 192.168.1.101"