Windows : make request on specific interface - windows

I have 3 network interface plug in my pc (windows). I just wonder is there a easy way to make a http request from specific interface ?
I try curl but it seem not support windows.
Description here : https://curl.se/libcurl/c/CURLOPT_INTERFACE.html
libcurl does not support using network interface names for this option on Windows.
Here is my network details :
Ethernet adapter NETW 001:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::8a7:9368:bb58:1883%18
IPv4 Address. . . . . . . . . . . : 192.168.5.252
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.5.1
Ethernet adapter NETW 002:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e4e0:bc83:3e56:8de0%13
IPv4 Address. . . . . . . . . . . : 192.168.78.252
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.78.1
Ethernet adapter NETW 003:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::f0e7:c451:335:8587%12
IPv4 Address. . . . . . . . . . . : 192.168.1.252
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1

It is not clear what stops you from using the specific interface by its IPv4 Address. The same manual:
Pass a char * as parameter. This sets the interface name to use as outgoing network interface. The name can be an interface name, an IP address, or a host name.
If the parameter starts with "host!" it is treated as either an IP address or a hostname.
#if 1
curl_easy_setopt(curl, CURLOPT_INTERFACE, "192.168.78.252");
#else
curl_easy_setopt(curl, CURLOPT_INTERFACE, "host!192.168.78.252");
#endif

Related

How to resolve windows container IP from DNS on Windows 10 using Docker for Windows?

How, from a Windows 10 host, can I access containers through their hostnames?
For example, if I have two containers
container-a
container-b
I want to be able to use this command from the host and have it resolve to the IP address of container-a:
ping container-a
I'm running the latest stable Docker for Windows on Windows 10 using the Windows Container mode.
I'm using the default "nat" network type, with a subnet of 172.20.16.0/20
From the host machine, the docker NIC details:
Ethernet adapter vEthernet (HNS Internal NIC):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.20.16.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled
and the physical NIC details:
Ethernet adapter Ethernet:
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.173(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::1:1%5
192.168.1.1
DHCP Server . . . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : 192.168.1.1
NetBIOS over Tcpip. . . . . . . . : Enabled
Does the host NIC need to have the docker NIC's IP in it's DNS list?

Issues with starting virtual device with genymotion and virtualBox

I am not able to start my Genymotion virtual device with virtual box..every time i try to start my device It shows following error message:
when i tried to start my virtual device from my virtualbox It has the following error:
Detailed List of all my full ip configuration:
C:\Users\beetel>ipconfig/all
>
> Windows IP Configuration
>
> Host Name . . . . . . . . . . . . : beetel-PC Primary Dns Suffix
> . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP
> Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . .
> . : No
>
> Ethernet adapter Local Area Connection 2:
>
> Connection-specific DNS Suffix . : Description . . . . . . . .
> . . . : Microsoft Loopback Adapter Physical Address. . . . . . . .
> . : 02-00-4C-4F-4F-50 DHCP Enabled. . . . . . . . . . . : Yes
> Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . .
> . . . : fe80::e47e:753b:4c29:a5f1%18(Preferred) Autoconfiguration
> IPv4 Address. . : 169.254.165.241(Preferred) Subnet Mask . . . . .
> . . . . . . : 255.255.0.0 Default Gateway . . . . . . . . . :
> DHCPv6 IAID . . . . . . . . . . . : 369229900 DHCPv6 Client DUID. .
> . . . . . . : 00-01-00-01-15-89-26-AE-10-78-D2-16-02-DE
>
> DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
> fec0:0:0:ffff::2%1
> fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled
>
> Wireless LAN adapter Lenovo Easyplus Hotspot :
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft Virtual WiFi Miniport Adapter Physical Address. . . .
> . . . . . : 00-E0-4C-04-5F-F1 DHCP Enabled. . . . . . . . . . . :
> Yes Autoconfiguration Enabled . . . . : Yes
>
> Wireless LAN adapter Wireless Network Connection:
>
> Connection-specific DNS Suffix . : Description . . . . . . . .
> . . . : Leoxsys LEO-150N Wireless LAN 802.11n USB
> 2.0 Network Adapter Physical Address. . . . . . . . . : 00-E0-4C-04-5F-F1 DHCP Enabled. . . . . . . . . . . : Yes
> Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . .
> . . . : fe80::cce8:4e5f:3c3c:c5a5%12(Preferred) IPv4 Address. . . .
> . . . . . . . : 192.168.1.3(Preferred) Subnet Mask . . . . . . . .
> . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : Thursday,
> 4 August 2016 5:20:45 PM Lease Expires . . . . . . . . . . :
> Sunday, 7 August 2016 5:20:44 PM Default Gateway . . . . . . . . .
> : 192.168.1.1 DHCP Server . . . . . . . . . . . : 192.168.1.1
> DHCPv6 IAID . . . . . . . . . . . : 201384012 DHCPv6 Client DUID. .
> . . . . . . : 00-01-00-01-15-89-26-AE-10-78-D2-16-02-DE
>
> DNS Servers . . . . . . . . . . . : 52.35.184.148
> 8.8.8.8 NetBIOS over Tcpip. . . . . . . . : Enabled
>
> Ethernet adapter Local Area Connection:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Realtek PCIe FE Family Controller Physical Address. . . . . . .
> . . : 10-78-D2-16-02-DE DHCP Enabled. . . . . . . . . . . : Yes
> Autoconfiguration Enabled . . . . : Yes
>
> Ethernet adapter VirtualBox Host-Only Network:
>
> Connection-specific DNS Suffix . : Description . . . . . . . .
> . . . : VirtualBox Host-Only Ethernet Adapter Physical Address. . .
> . . . . . . : 08-00-27-00-28-2A DHCP Enabled. . . . . . . . . . . :
> No Autoconfiguration Enabled . . . . : Yes Link-local IPv6
> Address . . . . . : fe80::d159:6ed4:c7c:c02f%20(Preferred) IPv4
> Address. . . . . . . . . . . : 198.168.56.1(Preferred) Subnet Mask
> . . . . . . . . . . . : 255.255.0.0 Default Gateway . . . . . . . .
> . : DHCPv6 IAID . . . . . . . . . . . : 268959783 DHCPv6 Client
> DUID. . . . . . . . : 00-01-00-01-15-89-26-AE-10-78-D2-16-02-DE
>
> DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
> fec0:0:0:ffff::2%1
> fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled
>
> Ethernet adapter VirtualBox Host-Only Network #4:
>
> Connection-specific DNS Suffix . : Description . . . . . . . .
> . . . : VirtualBox Host-Only Ethernet Adapter #4 Physical Address.
> . . . . . . . . : 08-00-27-00-F4-D4 DHCP Enabled. . . . . . . . . .
> . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6
> Address . . . . . : fe80::4d07:55a8:8615:4646%30(Preferred) IPv4
> Address. . . . . . . . . . . : 192.168.21.2(Preferred) Subnet Mask
> . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . .
> . . : DHCPv6 IAID . . . . . . . . . . . : 705167399 DHCPv6
> Client DUID. . . . . . . . : 00-01-00-01-15-89-26-AE-10-78-D2-16-02-DE
>
> DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
> fec0:0:0:ffff::2%1
> fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled
>
> Tunnel adapter isatap.{4A68A292-E958-49F9-ADBB-B0A6B2E00AC2}:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft ISATAP Adapter Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter Teredo Tunneling Pseudo-Interface:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Teredo Tunneling Pseudo-Interface Physical Address. . . . . . .
> . . : 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . :
> No Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter isatap.{D8400DF5-8661-42E9-AF74-66AC888DA466}:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft ISATAP Adapter #2 Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter isatap.{FEF87388-CE30-4169-8799-C1EDEBF97301}:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft ISATAP Adapter #3 Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter isatap.{EE6EC7B1-AA13-43F4-9369-16F2EB5820D1}:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft ISATAP Adapter #4 Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter isatap.{925F633E-80F4-4D9B-926B-85932E0FAF48}:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft ISATAP Adapter #5 Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter isatap.{F16B7224-D444-47AB-95DB-CC3EEDD96739}:
>
> Media State . . . . . . . . . . . : Media disconnected
> Connection-specific DNS Suffix . : Description . . . . . . . . . .
> . : Microsoft ISATAP Adapter #7 Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes
>
> Tunnel adapter 6TO4 Adapter:
>
> Connection-specific DNS Suffix . : Description . . . . . . . .
> . . . : Microsoft 6to4 Adapter Physical Address. . . . . . . . . :
> 00-00-00-00-00-00-00-E0 DHCP Enabled. . . . . . . . . . . : No
> Autoconfiguration Enabled . . . . : Yes IPv6 Address. . . . . . . .
> . . . : 2002:c6a8:3801::c6a8:3801(Preferred) Default Gateway . . .
> . . . . . . : 2002:c058:6301::c058:6301 DNS Servers . . . . . . . .
> . . . : fec0:0:0:ffff::1%1
> fec0:0:0:ffff::2%1
> fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Disabled
I am using wifi on my system...
I tried every possible solution listed on stackoverflow related to genymotion error, virtualbox error and dhcp error or google solutions ...but none work..
EDIT 1:
Some Solutions I have Tried:
manually entering IP addresses, network masks and DHCP server as described on several posts (ie 192.168.56.1 etc)
deleting network adapters on global options in virtualbox so they get recreated upon start of genymotion.
installing a new VM for a generic phone instead of custom phone.
deleting virtualbox and genymotion and reinstalling from scratch + downloading all VMs again.
freeing up RAM to make sure I have most RAM available.
changing system RAM resources in VM configuration to 1024 or 2048 or increasing it as far as I could.
confirmed hyper-V is disabled from windows so that is NOT the issue.
setting "promiscuous mode" to: "allow VMs", or "deny", or "allow everything".
repairing VirtualBox
Few Links i followed to solution:
Not able to start genymotion device
virtualbox-kernel requires an x86-64cpu but only detected an i686 cpu
System and software Details:
CPU type:32 bit,intel
Host Os: windows 7 32 bit
Guest Os: windows 10 32 bit
Oracle Virtual Box version 5.0.26 r108824
Genymotion version:2.7.2 Android studio:2.1.1
Edit 2:
While looking for solution i found that this problem might be due to missing
files during installation of VirtualBox I found that "VirtualBox-5.0.26-r108824-MultiArch_x86.msi" was missing so i manged to repair VirtualBox ..but still no Progress with solution
Please help..!!!! ....I am stuck badly android studio avd is also not working.Please either suggest some alternatives..or solution to problem.
Your CPU type is 32 bit but you are trying to launch 64 bit kernel. That's all. Just switch to 64 bit CPU. OS can stay 32bit.
UPD.
As far as I see, genymotion is now available only for 64 bit CPU:
As for alternatives... If you can't afford new CPU, you can try debugging on physical device (USB connected Android phone) - it's cheap, simple and efficient.

I'm getting this error: Column count doesn't match value count at row 1

Column count doesn't match value count at row 1
This is the code:
/* execute SQL INSERT command */
$sql2 = "INSERT INTO form
(datesubmit,uitmid, idnumber, roomnumber, collegename, studname, phone, part,
program, faculty, cgpa, position1, position2, email, vehicle,
advisorname, hpnumberadvisor, emailadvisor, academic, oku,
date, sex, religion, address, fathername, fatherhp,
salfather, mothername, motherhp, salmother, namesibling1, ipt1, namesibling2,
ipt2, namesibling3, ipt3, namesibling4, ipt4, namesibling5, ipt5, namesibling6, ipt6, namesibling7, ipt7,
namesibling8, ipt8, namesibling9, ipt9, namesibling10, ipt10)
VALUES (now(),'" . $uitmid . "', '" . $idnumber . "', '" . $roomnumber . "', '" . $collegename . "',
'" . $studname . "', '" . $phone . "', '" . $part . "', '" . $program . "', '" . $faculty . "',
'" . $cgpa . "', '" . $position1 . "', '" . $position2 . "', '" . $email . "', '" . $vehicle . "',
'" . $advisorname . "', '" . $hpnumberadvisor . "', '" . $emailadvisor . "', '" . $academic . "', '" . $oku . "',
'" . $date . "', '" . $sex . "',
'" . $religion . "', '" . $address . "', '" . $fathername . "', '" . $fatherhp . "', '" . $salfather . "', '" . $mothername . "',
'" . $motherhp . "', '" . $salmother . "', '" . $namesibling1 . "', '" . $ipt1 . "',
'" . $namesibling2 . "', '" . $ipt2 . "', '" . $namesibling3 . "', '" . $ipt3 . "',
'" . $namesibling4 . "', '" . $ipt4 . "', '" . $namesibling5 . "','" . $ipt5 . "' ,'" . $namesibling6 . "' ,'" . $ipt6 . "',
'" . $namesibling7 . "' ,'" . $ipt7 . "' ,'" . $namesibling8 . "' ,'" . $namesibling9 . "' ,'" . $ipt9 . "' ,'" . $namesibling10 . "' ,'" . $ipt10 . "')";
mysql_query($sql2) or die ("Error: " . mysql_error());
The query is missing a values for ipt8. The error occurred because the values being inserted didn't match the number of fields specified in the table.

Grails can no longer save record to Oracle

I made some changes to my packages, basically created a new project, everything works fine except when I try to save my changes I get this message:
Message: Unsupported feature
Line | Method
->> 125 | throwSqlException in oracle.jdbc.driver.DatabaseError
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 162 | throwSqlException in ''
| 227 | throwSqlException . . . . . . . . . in ''
| 537 | throwUnsupportedFeatureSqlException in ''
| 3091 | prepareStatement . . . . . . . . . in oracle.jdbc.driver.PhysicalConnection
| 140 | $tt__save in gov.mt.mdt.step.ReportController
| 200 | doFilter . . . . . . . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 53 | doFilter . . . . . . . . . . . . . in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . . . . . . . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
Here is the database info from DataSource.config:
development {
dataSource {
dbCreate = "update"
url = "jdbc:oracle:thin:#server:1521:DEV"
driverClassName = "oracle.jdbc.OracleDriver"
username = "step"
password = "****"
dialect = "org.hibernate.dialect.Oracle10gDialect"
}
}
production {
dataSource {
dbCreate = "update"
url = "jdbc:oracle:thin:#server:1521:DEV"
driverClassName = "oracle.jdbc.OracleDriver"
username = "step"
password = "****"
dialect = "org.hibernate.dialect.Oracle10gDialect"
pooled = true
properties {
maxActive = -1
minEvictableIdleTimeMillis=1800000
timeBetweenEvictionRunsMillis=1800000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1 FROM DUAL"
}
}
Same result in development and production. I do have ojdbc14.jar in the lib folder. It worked fine before, I did insert a record directly into the database, but that did not have cause an issue previously. I can read and edit records no problem.
One thing I thought could be an issue is changelog.groovy...

IP changes while pinging IPV6 address [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I have made a small demo program to sniff IPV6 packets . I am trying to ping the said machine from a remote one . My site local address is "FEC0..." and Link local address is "FE80..." . However , when i ping the machine and view the destination address of the ping packet , the address is sometimes "FeC0..." , sometimes "Fe80..." and even "FF02.." at times. I cannot understand why it would ping to a IP different from the specified one. I specify the destination address as "FEC0...".
Can someone please explain this ?
Here is my output of "ipconfig /all"
Windows IP Configuration
Host Name . . . . . . . . . . . . : PT49
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Broadcast
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Realtek PCIe GBE Family Controller
Physical Address. . . . . . . . . : 38-60-77-87-02-4B
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.2.249
Subnet Mask . . . . . . . . . . . : 255.255.255.0
IP Address. . . . . . . . . . . . : fec0::1:3a60:77ff:fe87:24b%1
IP Address. . . . . . . . . . . . : fe80::3a60:77ff:fe87:24b%4
Default Gateway . . . . . . . . . : 192.168.2.1
DNS Servers . . . . . . . . . . . : 192.168.0.96
fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
Tunnel adapter Teredo Tunneling Pseudo-Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : FF-FF-FF-FF-FF-FF-FF-FF
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : fe80::5445:5245:444f%5
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter Automatic Tunneling Pseudo-Interface:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Automatic Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : C0-A8-02-F9
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : fe80::5efe:192.168.2.249%2
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1
fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Disabled
Thanks in advance
Strange results are not surprising as you don't really have IPv6 connectivity (I'm not seeing any global unicast address in your ipconfig), get a tunnel+subnet from SixXS and try again :)

Resources