04-28-2010
Routing or Iptables connections by hostname or ip address
edit; I found a solution that works, see thread #3
https://www.unix.com/302417065-post3.html
Hi there,
I have a small dedicated server that has four ip addresses and by default my httpd sends request using the servers main ip for all outbound connections.
I'm quite amateur at routing and iptables I figured I'd sign up here and ask the gurus for advice on the subject.
So here is the situation that I am having, my server that uses the ip 127.0.20.1 uses 127.0.20.1 for all outbound connections which is fine for almost everything, however lets say I want to connect to some.hostname or 10.0.0.74 etc etc is there a quick routing or ip tables trick/tip to simply make all connections requested to connect to 10.0.0.74 use 127.0.20.4 as opposed to using 127.0.20.1
Thank you all in advance for all advice or solutions.
--------
Mooofa
Last edited by mooofa; 04-28-2010 at 12:44 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a problem that when I am pinging with the IP address it is giving me whether a server is alive or not but when I am trying it with hostname it is giving unknown host
I have checked in /etc/hosts file and the IP address and hostname are both there...still the problem is there..
Can... (1 Reply)
Discussion started by: uLearner
1 Replies
2. Solaris
I am using netstat -na command to find out the number of network connections from a specific machine, but this returns information as of now. His there anyway that I can find out this information from yesterday or earlier.
Thanks,
Tim (3 Replies)
Discussion started by: tkimber
3 Replies
3. Shell Programming and Scripting
Dear Experts,
I have a text file on my itanium box which contains list of nearly 1000 hostnames. I do not have the IP Address of them. I want read each entry from the text file and want to do a nslookup to the DNS Server and get the IP Adresses and put them in another file in the format... (1 Reply)
Discussion started by: PrasannaKS
1 Replies
4. Shell Programming and Scripting
I have a tricky problem, and I'm quite the scripting newb.
I have Cisco ACLs that have IP addresses in them. I'd like to convert the IP's to hostnames for easier analysis. A sample ACL input file would be (I've obfuscated the IPs):
access-list acl-secure-out line 1 extended permit icmp any... (3 Replies)
Discussion started by: scolazz
3 Replies
5. UNIX for Dummies Questions & Answers
We are using Solaris as our database OS. Can you please help me to know how can i get the IP address of a solaris machine in my network from its hostname?
e.g. We have a remote database server with the hostname as xyz. Without connecting to the database OS, can i get the IP address of xyz OS from... (1 Reply)
Discussion started by: Anmol Sharma
1 Replies
6. Shell Programming and Scripting
Hi,
Sorry for my english. I need a shell script. .
If IP make more than 300 connection attempts to port:80 within 10 seconds
I want block it for 3600 second in iptables.
Thank you ver much for help. (2 Replies)
Discussion started by: tara123
2 Replies
7. IP Networking
Hi all,
I have a solution where a system can have multiple physical interfaces but a single IP address. I am looking to insert a Squid proxy (that will also perform source NAT), but the return packets must go back to the correct interface.
client network is 10.x.x.x
network between the... (4 Replies)
Discussion started by: wabbit02
4 Replies
8. AIX
Mutt 1.2.3.1i
AIX 5.3.12.1
We need to send email to external addresses. But are having problems with the sent-from hostname. They're going out with @server.mycompany.com. We need them to be @mycompany.com.
I'm setting from and hostname with -e 'set from="From... (1 Reply)
Discussion started by: Papa Lee
1 Replies
9. Solaris
Hi,
Anyone can help?
Currently :
I'm am using a smtp smart relay, 1 hostname but different IP Address 192.168.2.108 and 192.168.2.109).
I'm using "smtp.mailhostname.com mailhost" and having an IP Address 192.168.2.108, but there is a certain minutes/seconds that the IP Address will... (2 Replies)
Discussion started by: fspalero
2 Replies
10. IP Networking
Hello
I have a question about routing in MANET using Dynamic Source Routing protocol.
IN RFC4728 (DSR) in section "IP fields" of RREP (Route Reply) packet we have this:
ok.
I read in several books and also in rfc4728 that: when a source node (node that initiate route discovery process)... (1 Reply)
Discussion started by: acu281
1 Replies
LEARN ABOUT X11R4
upsd.conf
UPSD.CONF(5) NUT Manual UPSD.CONF(5)
NAME
upsd.conf - Configuration for Network UPS Tools upsd
DESCRIPTION
upsd uses this file to control access to the server and set some other miscellaneous configuration values. This file contains details on
access controls, so keep it secure. Ideally, only the upsd process should be able to read it.
CONFIGURATION DIRECTIVES
"MAXAGE seconds"
upsd usually allows a driver to stop responding for up to 15 seconds before declaring the data "stale". If your driver takes a very
long time to process updates but is otherwise operational, you can use MAXAGE to make upsd wait longer.
Most users should leave this at the default value.
"STATEPATH path"
Tell upsd to look for the driver state sockets in path rather than the default that was compiled into the program.
"LISTEN interface port"
Bind a listening port to the interface specified by its Internet address. This may be useful on hosts with multiple interfaces. You
should not rely exclusively on this for security, as it can be subverted on many systems.
Listen on TCP port port instead of the default value which was compiled into the code. This overrides any value you may have set with
configure --with-port. If you don't change it with configure or this value, upsd will listen on port 3493 for this interface.
Multiple LISTEN addresses may be specified. The default is to bind to 127.0.0.1 if no LISTEN addresses are specified (and ::1 if IPv6
support is compiled in).
LISTEN 127.0.0.1
LISTEN 192.168.50.1
LISTEN ::1
LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344
This parameter will only be read at startup. You'll need to restart (rather than reload) upsd to apply any changes made here.
"MAXCONN connections"
This defaults to maximum number allowed on your system. Each UPS, each LISTEN address and each client count as one connection. If the
server runs out of connections, it will no longer accept new incoming client connections. Only set this if you know exactly what you're
doing.
"CERTFILE certificate file"
When compiled with SSL support, you can enter the certificate file here. The certificates must be in PEM format and must be sorted
starting with the subject's certificate (server certificate), followed by intermediate CA certificates (if applicable_ and the highest
level (root) CA. It should end with the server key. See docs/security.txt or the Security chapter of NUT user manual for more
information on the SSL support in NUT.
SEE ALSO
upsd(8), nutupsdrv(8), upsd.users(5)
INTERNET RESOURCES
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/
Network UPS Tools 05/21/2012 UPSD.CONF(5)