I have an interface already configured for an internal interface, which is static under eth0. My question is, can I create a dynamic outfacing interface under eth1.
The reason I want to so this is because, my ISP doesn't support fixed external IP addresses and I am running a server using DynDns. The problem is, I need to set a rule in iptables to FORWARD traffic to my external IP and I need an interface to specify it to iptables, therefore if I use my current external IP it will change.
My output of ifconfig
:
root@helloworld:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0e:7f:a9:10:54
inet addr:192.168.0.8 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20e:7fff:fea9:1054/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:357 errors:0 dropped:0 overruns:0 frame:0
TX packets:358 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:37555 (37.5 KB) TX bytes:43900 (43.9 KB)
Interrupt:20
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:36 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3467 (3.4 KB) TX bytes:3467 (3.4 KB)
root@helloworld:~#