Good day.
I am relatively new to Linux so please bear with me.
I am trying to set up my linux box as a gateway. I have 2 NICs one is for my internal Lan and the other to the internet. I have two public IPs and I want to set it up so that hitting any of the two IP goes to my FC6 box.
Ive setup the following scripts:
/etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=202.91.162.50
NETMASK=255.255.255.224
GATEWAY=202.91.162.30
/etc/sysconfig/network-scripts/ifcfg-eth2:0
DEVICE=eth2:0
ONBOOT=yes
BOOTPROTO=static
IPADDR=202.91.162.51
NETMASK=255.255.255.224
GATEWAY=202.91.162.30
/etc/sysconfig/network-scripts/ifcfg-eth4
DEVICE=eth4
HWADDR=00:0a:5e:78:43:18
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
TYPE=Ethernet
ifconfig:
eth2 Link encap:Ethernet HWaddr 00:14:BF:59
8:BC
inet addr:202.91.162.50 Bcast:202.91.162.255 Mask:255.255.255.224
inet6 addr: fe80::214:bfff:fe59:d8bc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:243524425 errors:0 dropped:39 overruns:0 frame:0
TX packets:233951453 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3236639444 (3.0 GiB) TX bytes:503261719 (479.9 MiB)
Interrupt:74 Base address:0xc100
eth2:0 Link encap:Ethernet HWaddr 00:14:BF:59
8:BC
inet addr:202.91.162.50 Bcast:202.91.162.255 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:74 Base address:0xc100
As you can see, I tried setting up an alias on my eth2. eth2:0 actually goes up but when I try to ping my public IP's from within my FC6 box, it says something like :
ping: sendmsg: Operation not permitted
And when I tried to ssh from a remote machine (outside my network, from internet), I can get in only if I use IP assigned to eth2, but not the IP assigned to eth2:0.
I want to set up this IP on this same box so I can forward ssh requests to another linux box on my network.
Need help badly. Thanks