You are not logged in.
Hi
I am using 2 IPs. One is a private and next one is public IP address. The following questions are:
1. How Can I write both IPs to rc.conf ?
2. How can I restart rc.conf without restart PC ?
Thanks a lot !
Offline
Two IPs, so you have 2 NICs right?
1) If so, make sure you have entries for eth0 and eth1 in rc.conf.
2) If you run '/etc/rc.d/network restart' it should re-read your rc.conf interfaces.
v/r
Suds
Offline
No, I have only one NIC. I know that I'll need to use iptables, (that's ok). But I need add some routes. Can I do it over "route" or over rc.conf ?
Offline
Ummm... what? That doesn't make any sense... how can you have 2 IPs assigned to one interface... I don't think that's even possible.
Can you explain your network topology a bit?
For instance, I have:
DSL modem -> router
router connects to 3 machines, hardwired, and 3 wireless
Offline
Sure that i'ts possible to have more IPs on one eth. I have a classical microwave to my Provider. One IP is on LAN..it's a private IP address 172.16.51.2 and the next IP is public
62.65.180.11.
You need to add to your eth both address. for exmaple:
eth0 - 172.16.51.2
eth0:1 - 62.65.180.11
Then it is only question of routing...
Offline
Here is what I use. Both local, but it is easy to expound on this...
rc.conf snippet
lo="lo 127.0.0.1"
eth0="eth0 192.168.1.40 netmask 255.255.255.0 broadcast 192.168.1.255"
eth01="eth0:1 192.168.1.41 netmask 255.255.255.0 broadcast 192.168.1.255"
INTERFACES=(lo eth0 eth01)
gateway="default gw 192.168.1.1"
localhost="-net 127.0.0.0 netmask 255.0.0.0 metric 0 lo"
ROUTES=(localhost gateway)
Useful for binding lots of ips to a single host..for things like webhosting (ip based virtual hosting, so each host can have its own SSL Cert).
It is also nice for providing mutliple services. I have a dns server running on .41, but not on .40.
"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍
Offline
Thx, That's what I was looking for. I was interrested only in syntax.
Offline