This article is automatically synchronized by Tencent Cloud + Community, the original address https://stackoverflow.club/article/ubuntu_software_router/
The network card of dhcp is set to the wired network card of server, and it is set to static ip 192.168.19.1
The client is directly connected to the server's network card, the client can obtain ip 192.168.19.150 with dhcp, but the server's wired network card also immediately obtains ip 192.168.19.151
Blog post referenced when setting up dhcp server
Continuing the previous configuration, the difference is that the server wired network card is fixed to 192.168.19.1 in the networkmanager. After the client is connected, the ip of the server wired network card will not change.
After setting iptables with reference to pptpd V**, the curl specified network card in the client cannot obtain web page information
Found that the previous settings are correct, but the name server is not specified
After waiting for a long time, such a result appears on the internal network machine
wenfeng@wenfeng-xiaoxin:~$ curl stackoverflow.club --interfaceenp3s0
curl:(6) Could not resolve host: stackoverflow.club
The problem can be solved by changing the domain name to the ip address
After setting the dns nameserver in the dhcp server to 8.8.8.8, the client can indeed access the Internet, but it is found that the server's redsocks proxy cannot be used to access the Internet. The guess is that the server's iptables settings are incorrect.
openwrt transparent proxy Internet access
iptables is very detailed and comprehensive explanation
curl --interfaceeth0-X GET http://10.200.0.33
Recommended Posts