0

I run an ubuntu server. It has 1 NIC with 2 IP address. it looks like this:

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.23
netmask 255.255.255.0
gateway 192.168.1.254

auto eth0:0
iface eth0:0 inet static
name Ethernet alias LAN card
address 101.0.140.53
netmask 255.255.255.248
gateway  101.0.140.54

I can bind the application to either IP address but no to both. So when I bind it to the wan, no one on the lan can connect (something with the router not allowing it) So wan users connect to the address 101.0.140.53. Lan user can use the 192.168.1.23 to connect to.

I want to bind to the WAN address and set up perhaps iptable to move the 192.168.1.23 straight to the 101.0.140.53. Or any another method.

any help would be great

masegaloeh
  • 17,978
  • 9
  • 56
  • 104

1 Answers1

2

Bind to 0.0.0.0. That means all the IPs.

Marcelo
  • 735
  • 4
  • 5