Page 1 of 1

Public IP for vicidial - network config problem

PostPosted: Fri Jan 27, 2012 5:28 pm
by x44
Hi!

I read for 4 days various articles on it, but being a networking and Linux Noob, could not make it work. I am out of ideas with no hope of making it on my own, so please, HELP!

I am trying to set up a laptop with Ubuntu8.04 as a gteway/router. Laptop needs Public IP because Vicidial does not work behind NAT. DMZ did not work, so I am setting it up to connect directly to modem and pass through internet connection to WiFi router

Laptop connects to Internet modem with USB (eth2) port, and to WiFi Router with LAN (eth0) port. In this setup, eth2 connects to internet, but eth0 is not connecting to WiFi router - Ping returns "Destination Host Unreachable."

There is no bridge and no DHCP on laptop.

When connected to LAN as Computer 3 (192.168.0.202) (eth0) it is working fine.

eth0 and eth2 are as follows
Eth0
address 192.168.0.202
netmask 255.255.255.0
network 192.168.0.0
gateway 192.168.0.1 - WiFi Routeer

Eth2
Address 68.37.253.151
netmask 255.255.252.0
Gateway 68.37.136.1


My current LAN setup:
Internet Modem -> WiFi Router (192.168.0.1)
IP Address : 68.37.253.151
Subnet Mask : 255.255.252.0
Default Gateway :68.37.136.1
DNS : 4.2.2.2 8.8.8.8
-> -> ->Computer 1 (192.168.0.100), Computer 2 (192.168.0.101), VoIP Phone (192.168.0.102)

I am trying to set up:

Internet Modem -> Linux (Ubuntu 8.04 LTE) server ->
-> WiFi Router (192.168.0.1) -> -> -> Computer 1 (192.168.0.100), Computer 2 (192.168.0.101), VoIP Phone (192.168.0.102)

Kernel IP routing table behind router reads

Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

When eth2 is on, (ahead of router) it reads
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
67.37.252.0 0.0.0.0 255.255.254.0 U 0 0 0 eth2

I edited file /etc/init.d/firewall.sh

iptables --table nat --append POSTROUTING --out-interface eth2 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT

Edited /etc/sysctl.conf
to enable net.ipv4.ip_forward=1

Thank you for reading.

PostPosted: Sat Jan 28, 2012 11:29 pm
by williamconley
I am trying to set up a laptop with Ubuntu8.04 as a gteway/router. Laptop needs Public IP because Vicidial does not work behind NAT. DMZ did not work, so I am setting it up to connect directly to modem and pass through internet connection to WiFi router
And from here you get worse. Unless you intend to run Vicidial on your laptop, you're complaining that Vicidial won't run with NAT so you're going to build a NAT to fix this. Hm. If you ARE going to run Vicidial in your laptop, just install Vicibox 3.1.14 in a regular computer and use two network cards (one for external to connect to the Carriers and one for internal to communicate with the Agents ...). Standard setup. All handled in yast during installation.

Otherwise:

Please explain "Vicidial does not work behind NAT". We build Vicidial servers behind NAT every day.

Also: What you are building will be worse than NAT as it will ultimately be a homemade messy attempted network instead of something useful and I don't even want to talk about WiFi in association with Vicidial ... so let's just hope they were mentioned together because they coexist in the same room, and not that you intend to attempt to run your carrier or agent connections on wireless. LOL

If you want to set up an external Network IP address for Vicidial ... you do not need your laptop to act as a router to get there.

So before you ask us to take you through a course in Net+ ... why don't we approach this from a more sensible direction and find out what you have ...

How many IP addresses and how much bandwidth do you have from your provider?

Describe your internal network starting with the device your ISP has given you with your internet in it ... also, of course, let us know if the connection you've been provided already has a Private IP address or if you have been provided with direct access to your public IP. (if your IP address from your provider is supplied by them and is "192.168.X.X" or "10.X.X.X" it is a private IP address and NOTHING you do will get rid of the NAT because it has already happened).

Vicidial behind NAT - problems

PostPosted: Tue Jan 31, 2012 11:51 am
by x44
HI!
So, let me clarify the points you raised:
1) Yes, Vicidial is on the laptop
2) I hired someone to configure dialer, we used Zoiper on IAX; during test, autodialer called my test phone; it rang, but audio was garbled. Then I connected laptop directly behind modem, putting it on public IP. Next test call was clear. So, since that was only change, I presume NAT is a problem (yes, I setup port forwarding in router)
3) connection was always LAN or USB - no wireless. As you might know, Ubuntu 8.04lte does not support all WiFi cards, as the case with me :)
4) Ip addresses from my provider - I wrote that, here it is again:
My current LAN setup:
Internet Cable Modem -> WiFi Router (192.168.0.1)
IP Address : 68.37.253.151
Subnet Mask : 255.255.252.0
Default Gateway :68.37.136.1
DNS : 4.2.2.2 8.8.8.
All devices connected to WiFi router vial 4 LAN ports.
LOOKS LIKE 1 ADDRESS ONLY - but that should be enough, right?


Now, reading your answer, the best solution would be making Vicidial work behind NAT - but I couldn't do it. What's the secret?

If vicidial does not work behind NAT for me, I can always put it between Modem and router, only problem is, router will not get internet connection. Laptop gets it from Modem via USB eth2 (see my first post) but no connection comes through laptop's LAN port eth0. I am sure my LAN port settings are wrong, if you see the error, pls let me know.
Thanks!