Internet disconnects from server as soon as i connect freeradius server box to client computer - coovachilli

I m trying to setup a captive portal using freeradius, coovachilli on Ubuntu 14 server(32 bit)
After the complete installation, the internet works fine on ubuntu server box with both freeradius and coovachilli running.
But when I connect client pc to second Ethernet card , the internet gets disconnected from server box and ofcourse the client machine also do not get the internet. However the client machine gets the IP 10.1.0.3 from dhcp.
I've reinstall the OS and the complete captive portal setup 5 times but the same pblm..
Where am I going wrong?
Note
When I install the OS my ethernet cards gets name as em1 and pp251. But I run apt get remove boisdevname and then update-initramfs -u to get the device name as eth0 and eth1. However the inbuilt card gets the name eth1 and the pci Ethernet card as eth0. So I put my internet cable to the second card so as to make my eth0 as WAN.

Related

Can I set a static ip address for WSL 2?

I'm doing some Ruby on Rails development on a WSL 2. The rails app connects to a MySQL server running on my Windows host. When I used WSL 1 it as easy to set the host to 127.0.0.1 but on WSL 2 I have to use the nameserver written in /etc/resolv.conf
But I found out that IP address written in resolv.conf changes on reboots.
Is there a way to set a static IP address for WSL 2 ?
You can consider ocroz/wsl2-boot (see INSTALL for installation instructions)
After running wsl-boot command:
The WSL network is configured as per its predefined definition always (Windows side),
All WSL hosts are configured with their predefined static IP always (Linux side),
All WSL hosts and connected Hyper-V VMs can talk to each other always,
The DNS resolution works however you are connected to Internet or VPN,
You can SSH to WSL host without any delay.
Dec. 2022, microsoft/WSL issue 4210 also adds:
With the latest Windows 11 (22621+), you can already specify the network adapter you want to use for WSL2 in .wslconfig:
[wsl2]
networkingMode=bridged
vmSwitch=my-switch
ipv6=true
So, now you can create a Hyper-V external virtual switch for WSL2 and fix the IP address, no other scripts are required. It works out-of-box.
The same thread adds:
Create a vSwitch in Hyper-V,I Use Hyper-V Gui to do this. Hyper-V has three types of virtual switches -- external, internal, and private.
I choose the "external" type , which is bridge type, the same as VMWare workstation.
set this config in .wslconfig
I find the IP change to the network of my home router,which is replace the old of eth0.
You can set DHCP in you home router, then Fix the IP of the bridge.
To sum up, in the case of bridge, it is essentially DHCP , and whether it is fixed or not depends on the DHCP server.
If you don't want /etc/hosts, /etc/resolv.conf to change after restart, you can create
/etc/wsl.conf
[network]
generateHosts = false
generateResolvConf = false

MySQL:Error 2003 lost connection from a virtual machine on the same localnetwork

Apologies for the bad english, i'm french. :D
I've been looking for an answer since approximatively 4 days, and I don't know how to fix my issue.
So:
I want to virtualize two servers using virtualBox on Windows7 and i want them all on the same local network.
My VMs are running on Ubuntu 16.04
On the first VM I installed a lamp web server with MySQL 5.7 and i add phpmyadmin.
On the second VM I installed Jira standalone
--> I need to connect to my Database from my Jira server
So I used the Bridge adapter on each machine:
network configuration
network configuration
Ip adresses are attributed with the DHCP protocol.
The SQL machine ip is 192.168.6.80
The Jira machine ip is 192.168.6.101
The Host machine ip is 192.168.6.87
I'm able to ping each machine so there is no problem.
SQL server
When I start the machine everything seems to work, i can access from my SQL server:
localhost : home page of apache 2 saying "It Works"
localhost:5671 :
[���
5.7.18-0ubuntu0.16.04.1� ���UKBeM�ÿ÷�ÿ����������T(DGKg1hwd=�mysql_native_password���ÿ„Got
packets out of order
localhost/phpmyadmin : the index page where I can connect perfectly with root.
Host Machine (Windows)
192.168.6.80 : home page of apache 2 saying "It Works"
192.168.6.80:5671 :
[���
5.7.18-0ubuntu0.16.04.1� ���UKBeM�ÿ÷�ÿ����������T(DGKg1hwd=�mysql_native_password���ÿ„Got
packets out of order
192.168.6.80/phpmyadmin : the index page where I can connect perfectly with root.
Jira server
Here when i start the machine it works during approximatively 2-3 minutes,
I'am able to connect via:
mysql -u root -p -h 192.168.6.80 -P 5671
I am perfectly connected and i can also access to all the other adresses.
And then it stop working on this machine only.
Unable to connect
Firefox can’t establish a connection to the server at 192.168.6.80.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
And when i re-try to connect via mysql on terminal I get the Error 2003 (HYOOO)
This happen only when i use the connection of my work, at home it works perfectly without stopping!!
I have few leads:
problems of proxy authentication
problems of firewall configuration
i am in a private network with a domain name called something.eu
And when i launch firefox the proxy shows up automatically:
and-etc-ha.something.eu:9090
So i'm invited to enter my id and password.
My id is : luc.myName#something.eu
After that i'm connected to internet with firefox but not in terminal when i want to use apt.
I search on the web and i found this:
export http_proxy="http://Username:password#proxyip:port/"
and
export http_proxy="http://Domain\user:pasword#proxyip:port/"
So I tried different ways and i was able to download with apt. But the internet connexion with firefox was unstable. But if I use firefox on my host machine the connexion is perfect.
I also tried with settings -> network -> network proxy -> method manual
http: and-etc-ha.something.eu port: 9090
I don't know if I was understandable, tell me!^^
If you have any ideas to help me to solve this problem let me know.
Bye!
I found the cause: In fact there was a ip conflict inside the LAN because the DHCP was giving in-use ip address.
I decide to use the NAT connection with Port Forwarding on VirtualBox.
With that configuration I'm able to access my VMs on my LAN using the host ip address followed by the port of my choice.

Can't access MySQL via 3G connection

I have one strange situation that I need help with...
My Linux machine is connected to internet via 3G connection and it is set up to save collected data to MySQL database that is located on a shared hosting. It's been working like that for a couple of months now without problems and now I'm trying to switch from shared hosting to a new VPS server that I've rented two weeks ago.
On new server I have MySQL installed and working, tried the connection from my desktop machine via Workbench, as well as from my mobile phone.
When I try the connection on Linux machine - it just won't connect to MySQL (double checked all the parameters).
I am connecting via IP address on standard TCP 3306 port, I'm sure that port is open on Linux machine because it worked with shared hosting without problems, and on VPS I know is opened because I can connect from my home machine and mobile phone (both on separate networks).
It seems to me that IP address of VPS server can't be accessed from Linux for some reason, but I can't tell why.
Telnet to VPS IP via 3306 port works from my (windows) desktop machine, on Linux I've tried
nmap {IP address} -p 3306 -PN
and got response:
PORT STATE SERVICE
3306/tcp filtered mysql
Everything seems to be working from other networks except the one on Linux station, and I don't know where to look for the problem. I have also a windows laptop that is connected to the Linux station 3G network and it also does not recognize the VPS IP address (can't telnet to 3306 port), but when I connect laptop to tethered network from my mobile phone - telnet to 3306 works... I'm totally puzzled!
Does anyone have an idea what I might be doing wrong? Why the VPS can't be accessed via 3G network?
Any help would be appreciated!
Thanks!

access mysql in host from guest virtualbox

This is my scenario,
I have a Ubuntu 12.10 host and a win 7 guest installed in the virtual box. The Network is configured to be NAT in the virtual box. I have a mysql sever installed in the Ubuntu with “bind_address” in my.cnf is commented out.
How can I access this mysql server from the windows 7 guest? I did some search in Google and came accross with this Host-Only Networking With VirtualBox but I cant get it work as I don't have statics IP with my internet vendor and my network knowledge is very bad. All I know is that I have DHCP enabled Internet connection. So if i do any IP's in the network settings I don't have Internet.
I know that there are plenty of solutions on the other way around (access the guest server from the host) but still cant figure it out.
So any help is appreciated.
Thanks
Your external IP being static or not has no bearing to accessing a virtualized server on your LAN.
Set VirtualBox to bridge mode.
Simply determine your computer's DHCP-selected internal IP (usually 192.168.1.SOMETHING) and replace the last number with another that is less than 250. For example, if your computer was 192.168.1.6, 192.168.1.70 would work fine on the VM(pick a high number to void conflicts).
Set it by using the control panel->adapter settings. Reboot the VM. Connect to MySQL at 192.168.1.70(or the address you picked earlier).
Note: If your computer's address is in a different subnet (192.168.0.XXX, 10.XX.XX.XX, etc) change the last number and keep the first numbers the same as on the host.

AIR for Android SocketServer over WiFi

Developing a multiplayer game for Android and using the AIR SocketServer class to communicate between server and client AIR applications.
On Windows 8 I am using Virtual Router Plus to set up my PC laptop(where the server app is running) as a wifi hotspot.
I run ipconfig in cmd after my wifi is running to grab the ipv4 IP address under 'Wireless LAN adapter Local Area Connection'
This is the IP I bind to in the server app and connect to in the client app.
If I launch both server and client on the same machine, everything works fine.
When I install the client app on my Android device, I am unable to establish a socket connection. The WiFi is running properly on my Android device.
Is a policy file necessary on the server machine when creating socketserver connections over a local wifi network?
If so, shouldn't the client app be throwing a security error when it tries to connect?
I am lost as to what my troubleshooting steps should be. ANY tips or feedback appreciated!
This happend because, the AIR Socket communication works only in Desktop application.
Try this native extension, it works perfectly form me:
http://blog.aboutme.be/2011/12/14/udp-native-extension-for-air-mobile-now-with-android-support/