The previous post shows you how you can configure the outgoing ip in antinat but if you have multiple ips and you want to use all of them and you want to be able to control which one to be used for certain things that patch doesn't do enough for you.
Antinat should bind the ougoing connection on the same ip on which it receives the connection from the client.
So if you want to use a different ip just set your configure your socks settings in the browser or proxifier to the ip you want antinat to use.
And here's the patch to let you do that ...
This patch is incompatible with the one on the previous post, you can either have that one orÂ this one so make sure you apply it on the original antinat source.
Questions or suggestions are welcome as always ...
This post is the first in a series of posts about antinat. The posts will provide solutions for some "problems' with antinat. So here goes the first one ....
Antinat creates outgoing connection from the primary ip defined on the machine where it's running. There's a config option to make antinat listen on a specific ip but no config option to make it use a specific ip for outgoing connections.
The attached patch will make antinat use the same ip that it's listening on for outgoing connections. You specify the listening ip with the "interface" config option and now that ip will also be used for outgoing connections.
I assume you already know how to patch ... if not ... just ask in the comments or hire me to patch it for you 🙂
Virtualmin has this nice feature where you can enable dynamic host and virtualhost updates so when your ip changes virtualmin updates the ips in the virtualhosts definitions. Without this feature your sites would not work anymore if your ip changes and you would have to update the ips manually.
The problem with this feature is that it only supports the DynDNS service and not everyone is using this service to update their host when their ip changes.
I'm using my own dynamic dns service and the good news is that this service is using the same protocol as DynDNS so virtualmin needs little change in order to support it.
All I had to do was add a way of specifying the hostname and port of the dynip update server.
Here's the patch for virtualmin ( tested with 3.75 and 3.76 ) :
You have a machine running ubuntu, NetworkManager gets the ip from a dhcp server and you want to have another ip that never changes on the same interface (for example if you want to also act as a dhcp server for your local network and both the local and uplink are connected on the same interface).
Dhclient seems to support this through an "alias" statement and NetworkManager seems to use dhclient but I just couldn't make it work like this.
Create a script in /etc/network/if-up.d/ . Name is asÂ you wish. My choice was "alias" .
span style="color: #ff0000;">"$IFACE" != "lo"
Then make sure the script is executable:
You can replace the ip and mask to fit your needs.
NetworkManager will run this script automatically after it brings the interface up.
This worked for me but in the spirit of usability it would have been nice to have this kind of feature directly into NetworkManager's connection configuration gui.
Do you know any other way of doing this? Please share it in the comments.
you want to add multiple ips ( aliases ) to a network interface using webmin's Net module. Adding them one by one is a slow process.
Modify webmin's Net module to allow you to copy/paste ip addresses in a textbox ( one per line ) and then click once and wait for it to do it's job.
Here's the patch for webmin 1.410, I know it's an old version but it should be easy to adapt for newer versions, let me know if you need any help.
Log into webmin as root/admin , go to network configuration, click onÂ an interface in the interfaces section, click the "Add virtual interface" link and now you should see a text box where you can just insert each ip on a new line. then just click the "Create" button