0

I have a requirement where I have to run several cron jobs with specific IP in an EC2 instance. That specific IP is used by another EC2 instance. I have access to that EC2 instance.

Is there any possibility that I can make cron job to use that IP instead of the IP assigned to this instance?

Kenny Rasschaert
  • 9,045
  • 3
  • 42
  • 58

1 Answers1

0

Outgoing connections from the instance will always use the address of the "main" interface, almost always eth0. To make your cron jobs connect from a different IP address the program you run from cron must have an option to specify the source address. There's no way for cron itself to do this so if the program does not have this functionality you're SOL..

Lars Hansson
  • 101
  • 1