LinuxQuestions.org
Register a domain and help support LQ
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 05-04-2010, 08:14 PM   #1
guigos
LQ Newbie
 
Registered: May 2010
Posts: 2

Rep: Reputation: 0
Question Randomizing or Changing output IP


Hello folks, i'm kinda new on this, so i would like some help to solve this:

I have a proxy tunnel server which the client connects trough SOCKS protocol, for ex: he opens a ssh window "ssh -D 1070 server.com" and set his connection to SOCKS v5 on 127.0.0.1:1070.

My server is a VPN, and i have some external IPS set as virtual interfaces, like this:

net0 - 127.0.0.1
net0:0 - externalip1
net0:1 - externalip2

So thats the deal: I want that, when someone uses the proxy, the external ip the persons gets to be random, not always externalip1! Or... if he uses externalip2 to connect on ssh, his externalip should be externalip2. I don't want every user with the same external IP.

Thanks since now, hope I can do it
 
Old 05-04-2010, 10:26 PM   #2
guigos
LQ Newbie
 
Registered: May 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Ok, I've just solved... googled a little. For future references, for ones who might need:

iptables -A POSTROUTING -t nat - j SNAT --to externalip1-externalip150

this will choose randomly a ip betwen the 1 and the 150 to realize the conections.
 
  


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
Randomizing script quit working allenms Linux - Newbie 1 12-09-2009 03:21 PM
Randomizing MP3s for Player Device glsen_az Linux - Software 8 01-07-2007 02:09 AM
Randomizing GDM,KDM login screens meetashwin_16 Linux - Software 1 10-21-2005 06:49 AM
Tip: Randomizing and firewalling your tcp port range scottman Linux - Security 6 10-02-2004 12:42 AM
randomizing execution of some cron entries markus1982 Linux - General 2 06-28-2003 09:49 AM


All times are GMT -5. The time now is 09:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration